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.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/Sema/switch.c b/test/Sema/switch.c
index 122947e..3ee3712 100644
--- a/test/Sema/switch.c
+++ b/test/Sema/switch.c
@@ -1,5 +1,4 @@
// RUN: clang-cc -fsyntax-only -verify %s
-
void f (int z) {
while (z) {
default: z--; // expected-error {{statement not in switch}}
@@ -75,3 +74,14 @@ void test6() {
break;
}
}
+
+// PR5606
+int f0(int var) {
+ switch (va) { // expected-error{{use of undeclared identifier 'va'}}
+ case 1:
+ break;
+ case 2:
+ return 1;
+ }
+ return 2;
+}
OpenPOWER on IntegriCloud