Commit Graph

3 Commits

Author SHA1 Message Date
Douglas Gregor 2bf2d3d016 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
2010-04-14 16:09:52 +00:00
Douglas Gregor 9a48db1659 Print fix-it hints properly around tabs, from Christian Adåker!
llvm-svn: 93750
2010-01-18 19:28:01 +00:00
Chris Lattner 0c523e513a testcase for -ftabstop, patch by Christian Adaker!
llvm-svn: 93260
2010-01-12 22:06:58 +00:00