Don't warn for parentheses for the '&&' inside '||' for cases like:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 17 Nov 2010 18:26:36 +0000 (18:26 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 17 Nov 2010 18:26:36 +0000 (18:26 +0000)
commit567bb71a01bcf178c6fcabb3eecf7a8c4f71e674
tree46e3edcd7a71e13027738a885199f5cfc5f1b7a3
parent75fd3f98d1b10fbd5bb996e08873e7c6995ce2f0
Don't warn for parentheses for the '&&' inside '||' for cases like:

assert(a || b && "bad");

since this is safe. This way we avoid a big source of such warnings which in this case are practically useless.

Note that we don't handle *all* cases where precedence wouldn't matter because of constants since
this is a bit costly to check, and IMO clarifying precedence with parentheses is good for
readability in general.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119533 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExpr.cpp
test/Sema/parentheses.c