diff options
Diffstat (limited to 'test/Parser/switch-recovery.cpp')
-rw-r--r-- | test/Parser/switch-recovery.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Parser/switch-recovery.cpp b/test/Parser/switch-recovery.cpp new file mode 100644 index 0000000..8eb4cff --- /dev/null +++ b/test/Parser/switch-recovery.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// <rdar://problem/7971948> +struct A {}; +struct B { + void foo() { + switch (a) { // expected-error{{use of undeclared identifier 'a'}} + default: + return; + } + } +}; |