summaryrefslogtreecommitdiffstats
path: root/test/Sema/exprs.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/exprs.c')
-rw-r--r--test/Sema/exprs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index b22b522..9d3da90 100644
--- a/test/Sema/exprs.c
+++ b/test/Sema/exprs.c
@@ -142,3 +142,8 @@ void test19() {
*(volatile int*)0 = 0; // Ok.
}
+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.
+}
OpenPOWER on IntegriCloud