summaryrefslogtreecommitdiff
path: root/test/Sema/switch.c
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
commit4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (patch)
tree48b44512b5db8ced345df4a1a56b5065cf2a14d9 /test/Sema/switch.c
parentd7279c4c177bca357ef96ff1379fd9bc420bfe83 (diff)
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 27ad06657e26..bb4822916cc7 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;
+ }
+}