test.m
1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// RUN: clang-import-test -x objective-c++ -Xcc -fobjc-exceptions -dump-ast -import %S/Inputs/F.m -expression %s | FileCheck %s
// FIXME: Seems that Objective-C try/catch crash codegen on Windows. Reenable once this is fixed.
// UNSUPPORTED: system-windows
// CHECK: ObjCAtTryStmt
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: DeclStmt
// CHECK-NEXT: VarDecl
// CHECK-NEXT: ObjCAtThrowStmt
// CHECK-NEXT: ImplicitCastExpr
// CHECK-NEXT: DeclRefExpr
// CHECK-NEXT: ObjCAtCatchStmt
// CHECK-NEXT: VarDecl
// CHECK-SAME: varname
// CHECK-SAME: 'Exception *'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ObjCAtFinallyStmt
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ObjCAtTryStmt
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ObjCAtCatchStmt
// CHECK-NEXT: VarDecl
// CHECK-SAME: varname1
// CHECK-SAME: 'Exception *'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ObjCAtThrowStmt
// CHECK-NEXT: <<NULL>>
// CHECK-NEXT: ObjCAtCatchStmt
// CHECK-NEXT: VarDecl
// CHECK-SAME: varname2
// CHECK-SAME: 'OtherException *'
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ObjCAtTryStmt
// CHECK-NEXT: CompoundStmt
// CHECK-NEXT: ObjCAtFinallyStmt
// CHECK-NEXT: CompoundStmt
void expr() {
f();
}