Expand -Wlogical-not-parentheses to also fire on `!x & A`.
authorNico Weber <nicolasweber@gmx.de>
Thu, 27 Oct 2016 16:32:06 +0000 (16:32 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 27 Oct 2016 16:32:06 +0000 (16:32 +0000)
commit44f6f2ee423325e6157846593a74e5ed01ab3062
tree7bb39737f18a1789a24d402a2e9e3f4f24109c1d
parent6c273763a366de3b1e22348b638795795fb7e005
Expand -Wlogical-not-parentheses to also fire on `!x & A`.

This is a misspelling of the intended !(x & A) negated bit test that happens in
practice every now and then.

I ran this on Chromium and all its dependencies, and it fired 0 times -- no
false or true positives, but it would've caught a bug in an in-progress change
that had to be caught by a Visual Studio warning instead.

https://reviews.llvm.org/D26035

llvm-svn: 285310
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaCXX/warn-logical-not-compare.cpp