]> granicus.if.org Git - clang/commit
Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This
authorRichard Trieu <rtrieu@google.com>
Wed, 17 Apr 2013 02:12:45 +0000 (02:12 +0000)
committerRichard Trieu <rtrieu@google.com>
Wed, 17 Apr 2013 02:12:45 +0000 (02:12 +0000)
commit2a6e528cbd687e22744d5d7eba428afea99da300
tree158aacde760e616fab81ca3159cc18e537e0a67c
parent673c5d5e22b0af17bb9e903862f39e8a23d9e47f
Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses.  This
will fire on code such as:

  cout << x == 0;

which the compiler will intrepret as

  (cout << x) == 0;

This warning comes with two fixits attached to notes, one for parentheses to
silence the warning, and another to evaluate the comparison first.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179662 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
test/Sema/parentheses.cpp