Debian Codegraph @

clang/test/Rewriter/rewrite-try-catch.m

raw
1 // RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -std=c99 %s -o -
2
3 @interface Foo @end
4 @interface GARF @end
5
6 void TRY(void);
7 void SPLATCH(void);
8 void MYTRY(void);
9 void MYCATCH(void);
10
11 void foo(void) {
12 @try { TRY(); }
13 @catch (...) { SPLATCH(); @throw; }
14 }
15
16 int main(void)
17 {
18
19 @try {
20 MYTRY();
21 }
22
23 @catch (Foo* localException) {
24 MYCATCH();
25 @throw;
26 }
27
28 // no catch clause
29 @try { }
30 @finally { }
31 }
32