diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-04-14 16:09:52 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-04-14 16:09:52 +0000 |
| commit | 2bf2d3d0165f721a789109f06cd2c012a141a7a8 (patch) | |
| tree | 9f1486eb0f6cf7bb6aae34715b5d8e49b2facbc8 /llvm/lib/CodeGen/ShrinkWrapping.cpp | |
| parent | 65de3d140d22d74859d85c50c1fe45709b0bbc11 (diff) | |
| download | bcm5719-llvm-2bf2d3d0165f721a789109f06cd2c012a141a7a8.tar.gz bcm5719-llvm-2bf2d3d0165f721a789109f06cd2c012a141a7a8.zip | |
When diagnosing suspicious precedence or assignments, move the fix-it
that adds parentheses from the main diagnostic down to a new
note. This way, when the fix-it represents a choice between two
options, each of the options is associted with a note. There is no
default option in such cases. For example:
/Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; ==
will be
evaluated first [-Wparentheses]
if (x & y == 0) {
^~~~~~~~
/Users/dgregor/t.c:2:9: note: place parentheses around the &
expression to
evaluate it first
if (x & y == 0) {
^
( )
/Users/dgregor/t.c:2:9: note: place parentheses around the ==
expression to
silence this warning
if (x & y == 0) {
^
( )
llvm-svn: 101249
Diffstat (limited to 'llvm/lib/CodeGen/ShrinkWrapping.cpp')
0 files changed, 0 insertions, 0 deletions

