diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-08 00:20:23 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-08 00:20:23 +0000 |
commit | fa1e36d0de87b528007f4e29cc060e6f260d1051 (patch) | |
tree | 7560c2c83f0b7dbc0e9d4b6f1d34f7911feee05f /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | df34917a38c6d9b2792a82fdc4bec2437db0c1b6 (diff) | |
download | bcm5719-llvm-fa1e36d0de87b528007f4e29cc060e6f260d1051.tar.gz bcm5719-llvm-fa1e36d0de87b528007f4e29cc060e6f260d1051.zip |
Improve the fix-its for -Wparentheses to ensure that the fix-it
suggestions follow recovery. Additionally, add a note to these
diagnostics which suggests a fix-it for changing the behavior to what
the user probably meant. Examples:
t.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first
[-Wparentheses]
if (i & j == k) {
^~~~~~~~
( )
t.cpp:2:9: note: place parentheses around the & expression to evaluate it first
if (i & j == k) {
^
( )
t.cpp:14:9: warning: using the result of an assignment as a condition
without
parentheses [-Wparentheses]
if (i = f()) {
~~^~~~~
( )
t.cpp:14:9: note: use '==' to turn this assignment into an equality
comparison
if (i = f()) {
^
==
llvm-svn: 92975
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions