blob: 8c6d08f2e01d60378a2bd642e5bfc7d4d487d198 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -rewrite-objc %s -o=-
Steve Naroff20ebf8f2008-01-19 00:42:38 +00002
Steve Naroffe12e6922008-02-01 20:02:07 +00003@interface Foo @end
Steve Naroff20ebf8f2008-01-19 00:42:38 +00004@interface GARF @end
5
Steve Naroffe12e6922008-02-01 20:02:07 +00006void foo() {
7 @try { TRY(); }
8 @catch (...) { SPLATCH(); @throw; }
9}
10
Steve Naroff20ebf8f2008-01-19 00:42:38 +000011int main()
12{
13
Steve Naroffc9ba1722008-07-16 15:31:30 +000014 @try {
15 MYTRY();
16 }
Steve Naroff20ebf8f2008-01-19 00:42:38 +000017
Steve Naroffc9ba1722008-07-16 15:31:30 +000018 @catch (Foo* localException) {
19 MYCATCH();
20 @throw;
21 }
22
23 // no catch clause
24 @try { }
25 @finally { }
Steve Naroff20ebf8f2008-01-19 00:42:38 +000026}
27