diff options
author | Steve Naroff <snaroff@apple.com> | 2009-04-14 20:53:38 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-04-14 20:53:38 +0000 |
commit | 1fc5194039fc01e84af46342bf6e0790f0ebb58c (patch) | |
tree | c2ce0ff5b7cb1aca42a8322f1ff475733055ef69 /test | |
parent | 7eba5c9df989632c4dcaf13a20798d33d9ba3186 (diff) |
Fix <rdar://problem/6252084> [sema] jumps into Obj-C exception blocks should be disallowed.
This builds on Eli's work from http://llvm.org/viewvc/llvm-project?view=rev&revision=65678.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/SemaObjC/scope-check-try-catch.m | 18 |
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: ; + } +} |