summaryrefslogtreecommitdiffstats
path: root/docs/ReleaseNotes.html
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-05-26 06:20:46 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-05-26 06:20:46 +0000
commitbdb97ff687ce85e45cc728b87612ed546f48c1e7 (patch)
tree726077290e0d5b9e8de204741b6e671d11cb6f9e /docs/ReleaseNotes.html
parent7f7c42b12ecb1560055a2c087d9ca5187ad357c3 (diff)
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
Diffstat (limited to 'docs/ReleaseNotes.html')
-rw-r--r--docs/ReleaseNotes.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html
index 8f30808f04..509e149ad2 100644
--- a/docs/ReleaseNotes.html
+++ b/docs/ReleaseNotes.html
@@ -102,12 +102,15 @@ int f(bool b) {
return n;
}
-<b>sometimes-uninit.cpp:5:10: <span class="warning">warning:</span> variable 'n' is sometimes uninitialized when used here [-Wsometimes-uninitialized]</b>
+<b>sometimes-uninit.cpp:3:7: <span class="warning">warning:</span> variable 'n' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]</b>
+ if (b)
+ <span class="caret">^</span>
+<b>sometimes-uninit.cpp:5:10: <span class="note">note:</span></b> uninitialized use occurs here
return n;
<span class="caret">^</span>
-<b>sometimes-uninit.cpp:3:7: <span class="note">note:</span></b> uninitialized use occurs whenever 'if' condition is false
+<b>sometimes-uninit.cpp:3:3: <span class="note">note:</span></b> remove the 'if' if its condition is always true
if (b)
- <span class="caret">^</span>
+ <span class="caret">^~~~~~</span>
<b>sometimes-uninit.cpp:2:8: <span class="note">note:</span></b> initialize the variable 'n' to silence this warning
int n;
<span class="caret">^</span>