blob: 500133b8614266f28610bed22d7ce1424a90c3ad [file] [log] [blame]
Fariborz Jahanianb1228182012-03-15 22:42:15 +00001// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
Fariborz Jahanian55261af2012-03-19 18:11:32 +00002// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3
4typedef struct objc_class *Class;
5typedef struct objc_object {
6 Class isa;
7} *id;
Fariborz Jahanianb1228182012-03-15 22:42:15 +00008
9void FINALLY();
10void TRY();
11void INNER_FINALLY();
12void INNER_TRY();
13void CHECK();
14
15@interface Foo
16@end
17
18@implementation Foo
19- (void)bar {
20 @try {
21 TRY();
22 }
23 @finally {
24 FINALLY();
25 }
26 CHECK();
27 @try {
28 TRY();
29 }
30 @finally {
31 @try {
32 INNER_TRY();
33 }
34 @finally {
35 INNER_FINALLY();
36 }
37 FINALLY();
38 }
39}
40@end