]> granicus.if.org Git - clang/commit
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)
commit8a306507846b680477cb90287eec9f957621e292
tree4f9ff65ede4191d657b8b266fcccf3b3a4ec33a5
parentae5b8bc484d2de5f73148daa469210f8d53c727e
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285310 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaExpr.cpp
test/SemaCXX/warn-logical-not-compare.cpp