aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/SemaObjC/scope-check-try-catch.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaObjC/scope-check-try-catch.m b/test/SemaObjC/scope-check-try-catch.m
new file mode 100644
index 0000000000..b11eb040d3
--- /dev/null
+++ b/test/SemaObjC/scope-check-try-catch.m
@@ -0,0 +1,18 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+@class A, B, C;
+
+void f() {
+ goto L; // expected-error{{illegal jump}}
+ goto L2; // expected-error{{illegal jump}}
+ goto L3; // expected-error{{illegal jump}}
+ @try {
+L: ;
+ } @catch (A *x) {
+L2: ;
+ } @catch (B *x) {
+ } @catch (C *c) {
+ } @finally {
+L3: ;
+ }
+}