]> granicus.if.org Git - clang/commit
Fix -Wlogical-not-parentheses to work better with C code.
authorRichard Trieu <rtrieu@google.com>
Wed, 19 Aug 2015 21:33:54 +0000 (21:33 +0000)
committerRichard Trieu <rtrieu@google.com>
Wed, 19 Aug 2015 21:33:54 +0000 (21:33 +0000)
commitadbde1446754c7e789ff9dba03066639c4bd3a20
treeb04320fab03c829397bdb518acb9c2c07521aa9b
parent26a4cecff4af05fc0e3f8d7b2f2a3eff2deef986
Fix -Wlogical-not-parentheses to work better with C code.

Remove the assumption of a Boolean type by checking if an expression is known
to have a boolean value.  Disable warning in two other tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245507 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExpr.cpp
test/Sema/atomic-compare.c
test/Sema/bool-compare.c
test/Sema/warn-logical-not-compare.c [new file with mode: 0644]