Repository navigation
Enable clang warnings for uninitialized variables/structs - #2424
Merged
Vishal Sharma (vcsharma) merged 2 commits intoAug 22, 2019
Merged
Conversation
Vishal Sharma (vcsharma)
requested review from
Helena Kotas (hekota) and
Tex Riddell (tex3d)
August 22, 2019 16:55
|
Would there be a pragma we could use to silence this warning? This is actually hanging our build environment (as the VS output windows appears to get a bit 'overwhelmed' by the number of messages coming from our distributed shader compilation system) so we wanted to selectively 'mute it' for a few files. |
Contributor
Author
|
Tiago Rodrigues (@tiago-rodrigues), are you hitting the case of spurious warnings as described in #2494? DXC supports a flag |
Vishal Sharma (vcsharma)
pushed a commit
to vcsharma/DirectXShaderCompiler
that referenced
this pull request
Nov 15, 2019
…crosoft#2424)" This reverts commit b342647.
|
Vishal Sharma (@vcsharma), sorry for the late reply. Yes I was hitting the case in #2494. Thanks for MR for the warning disable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As listed in issue #2419, unlike DXC, FXC has some support for generating diagnostic for uninitialized variables/structs (which is rather inconsistent). For example, FXC generates error for uninitialized variables, but only warns for uninitialized structs. Also, FXC fails to generate any warning when variables "may" be uninitialized (e.g., when initialized conditionally). This PR enables Clang warning for uninitialized variables/structs which produces much better diagnostic than FXC.
Fixes #2419