[PATCH] D66043: Add to -Wparentheses case of bitwise-and ("&") and bitwise-or ("|") verses conditional operator ("?:")
JF Bastien via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 10 09:03:54 PDT 2019
jfb added inline comments.
================
Comment at: test/Sema/parentheses.c:156
+
+ (void)(x ^ b ? 1 : 2); // no warning, ^ is often used as logical xor
+ (void)(x || b ? 1 : 2); // no warning, logical operator
----------------
I don't understand why `^` is different. What do you mean by "often used as a logical xor`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66043/new/
https://reviews.llvm.org/D66043
More information about the cfe-commits
mailing list