summaryrefslogtreecommitdiffstats
path: root/test/Sema/switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/switch.c')
-rw-r--r--test/Sema/switch.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/switch.c b/test/Sema/switch.c
index 27ad066..bb48229 100644
--- a/test/Sema/switch.c
+++ b/test/Sema/switch.c
@@ -277,3 +277,14 @@ void test16() {
case '6': return;
}
}
+
+// PR7359
+void test17(int x) {
+ switch (x >= 17) { // expected-warning {{switch condition has boolean value}}
+ case 0: return;
+ }
+
+ switch ((int) (x <= 17)) {
+ case 0: return;
+ }
+}
OpenPOWER on IntegriCloud