]> granicus.if.org Git - clang/commit
In response to some discussions on IRC, tweak the wording of the new
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 26 May 2012 06:20:46 +0000 (06:20 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 26 May 2012 06:20:46 +0000 (06:20 +0000)
commitbdb97ff687ce85e45cc728b87612ed546f48c1e7
tree726077290e0d5b9e8de204741b6e671d11cb6f9e
parent7f7c42b12ecb1560055a2c087d9ca5187ad357c3
In response to some discussions on IRC, tweak the wording of the new
-Wsometimes-uninitialized diagnostics to make it clearer that the cause
of the issue may be a condition which must always evaluate to true or
false, rather than an uninitialized variable.

To emphasize this, add a new note with a fixit which removes the
impossible condition or replaces it with a constant.

Also, downgrade the diagnostic from -Wsometimes-uninitialized to
-Wconditional-uninitialized when it applies to a range-based for loop,
since the condition is not written explicitly in the code in that case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157511 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ReleaseNotes.html
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/AnalysisBasedWarnings.cpp
test/Analysis/uninit-sometimes.cpp
test/Sema/uninit-variables.c