[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context
Dávid Bolvanský via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 30 12:47:35 PDT 2019
xbolva00 marked an inline comment as done.
xbolva00 added inline comments.
================
Comment at: test/Sema/warn-int-in-bool-context.c:32
+ r = a ? -2 : 0;
+ r = a ? 3 : -2;
+ r = a ? 0 : TWO; // expected-warning {{'?:' with integer constants in boolean context}}
----------------
jfb wrote:
> Why wouldn't think one warn?
Ah, right. Thanks !
I forgot there is an unary minus operator..
Will fix it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63082/new/
https://reviews.llvm.org/D63082
More information about the cfe-commits
mailing list