diff options
author | Chris Lattner <sabre@nondot.org> | 2010-07-15 00:26:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-07-15 00:26:43 +0000 |
commit | deee7a3c0bf5897dbe00277097c5b86eddf894a2 (patch) | |
tree | cd5a20464d42a1f6056a7c7d4a4c22751cb7beff /clang/test/Sema/exprs.c | |
parent | 8b1bb8cfbdbeb8d05f83aa4bf1c652622bd1e243 (diff) | |
download | bcm5719-llvm-deee7a3c0bf5897dbe00277097c5b86eddf894a2.tar.gz bcm5719-llvm-deee7a3c0bf5897dbe00277097c5b86eddf894a2.zip |
restrict the && -> & warning to cover a case daniel noted.
Don't warn about "logically bool" expressions on the RHS,
even if they fold to a constant.
llvm-svn: 108388
Diffstat (limited to 'clang/test/Sema/exprs.c')
-rw-r--r-- | clang/test/Sema/exprs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Sema/exprs.c b/clang/test/Sema/exprs.c index 54e44693e08..9d3da908549 100644 --- a/clang/test/Sema/exprs.c +++ b/clang/test/Sema/exprs.c @@ -144,4 +144,6 @@ void test19() { int test20(int x) { return x && 4; // expected-warning {{use of logical && with constant operand; switch to bitwise & or remove constant}} + + return x && sizeof(int) == 4; // no warning. } |