32 lines · plain
1// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp -fexperimental-new-constant-interpreter2// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp3 4void foo(id arg);5 6@interface NSException7@end8 9@interface Foo10@end11 12@implementation Foo13- (void)bar {14 @try {15 } @catch (NSException *e) {16 foo(e);17 }18 @catch (Foo *f) {19 }20 @catch (...) {21 @try {22 }23 @catch (Foo *f1) {24 foo(f1);25 }26 @catch (id pid) {27 foo(pid);28 }29 }30}31@end32