diff options
Diffstat (limited to 'clang/test/SemaObjC/scope-check-try-catch.m')
-rw-r--r-- | clang/test/SemaObjC/scope-check-try-catch.m | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/scope-check-try-catch.m b/clang/test/SemaObjC/scope-check-try-catch.m new file mode 100644 index 00000000000..b11eb040d38 --- /dev/null +++ b/clang/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: ; + } +} |