Steve Naroff | 7e3ec6d | 2009-04-14 20:53:38 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
2 | |||||
3 | @class A, B, C; | ||||
4 | |||||
5 | void f() { | ||||
6 | goto L; // expected-error{{illegal jump}} | ||||
7 | goto L2; // expected-error{{illegal jump}} | ||||
8 | goto L3; // expected-error{{illegal jump}} | ||||
9 | @try { | ||||
10 | L: ; | ||||
11 | } @catch (A *x) { | ||||
12 | L2: ; | ||||
13 | } @catch (B *x) { | ||||
14 | } @catch (C *c) { | ||||
15 | } @finally { | ||||
16 | L3: ; | ||||
17 | } | ||||
18 | } | ||||
Steve Naroff | 7451170 | 2009-04-15 14:38:36 +0000 | [diff] [blame^] | 19 | |
20 | void f0(int a) { | ||||
21 | if (a) goto L0; | ||||
22 | @try {} @finally {} | ||||
23 | L0: | ||||
24 | return; | ||||
25 | } | ||||
26 |