[PATCH] D66043: Add to -Wparentheses case of bitwise-and ("&") and bitwise-or ("|") verses conditional operator ("?:")
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 10 09:48:38 PDT 2019
MaskRay added inline comments.
================
Comment at: test/Sema/parentheses.c:148
+
+ (void)(x | b ? 1 : 2); // expected-warning {{operator '?:' has lower precedence than '|'}} expected-note 2{{place parentheses}}
+ (void)(x & b ? 1 : 2); // expected-warning {{operator '?:' has lower precedence than '&'}} expected-note 2{{place parentheses}}
----------------
I hope these `| ? :` `& ? :` warnings are disabled-by-default.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66043/new/
https://reviews.llvm.org/D66043
More information about the cfe-commits
mailing list