blob: 8720d0c9b91b7e906b899478b0db591c3e9af4c4 [file] [log] [blame]
John McCall5fb5df92012-06-20 06:18:46 +00001// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
Steve Naroffc7d2df22008-01-19 00:42:38 +00002
Steve Naroffedb5bc62008-02-01 20:02:07 +00003@interface Foo @end
Steve Naroffc7d2df22008-01-19 00:42:38 +00004@interface GARF @end
5
Steve Naroffedb5bc62008-02-01 20:02:07 +00006void foo() {
7 @try { TRY(); }
8 @catch (...) { SPLATCH(); @throw; }
9}
10
Steve Naroffc7d2df22008-01-19 00:42:38 +000011int main()
12{
13
Steve Naroffce2dca12008-07-16 15:31:30 +000014 @try {
15 MYTRY();
16 }
Steve Naroffc7d2df22008-01-19 00:42:38 +000017
Steve Naroffce2dca12008-07-16 15:31:30 +000018 @catch (Foo* localException) {
19 MYCATCH();
20 @throw;
21 }
22
23 // no catch clause
24 @try { }
25 @finally { }
Steve Naroffc7d2df22008-01-19 00:42:38 +000026}
27