[PATCH] D26035: Expand -Wlogical-not-parentheses to also fire on `!x & A`.

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 27 09:17:50 PDT 2016


hans accepted this revision.
hans added a comment.
This revision is now accepted and ready to land.

lgtm, very nice! (with one clarifying question)



================
Comment at: test/SemaCXX/warn-logical-not-compare.cpp:224
+  // These already err, don't also warn.
+  !x &= 1; // expected-error{{expression is not assignable}}
+  !x |= 1; // expected-error{{expression is not assignable}}
----------------
And this is the reason you had to put a "not" on the second run line, right?


https://reviews.llvm.org/D26035





More information about the cfe-commits mailing list