Don't warn for parentheses for the '&&' inside '||' for cases like:
commit76a854148781245d130be4685ac28163b70eb62c
authorArgiris Kirtzidis <akyrtzi@gmail.com>
Wed, 17 Nov 2010 18:26:36 +0000 (17 18:26 +0000)
committerArgiris Kirtzidis <akyrtzi@gmail.com>
Wed, 17 Nov 2010 18:26:36 +0000 (17 18:26 +0000)
tree46e3edcd7a71e13027738a885199f5cfc5f1b7a3
parent2bfe982d391ea95f0eabda604e84184f3974ff85
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