Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Import / objc-try-catch / test.m
blob03485c0ba06b7e5b3c9e9104b05230ace4f11985
1 // UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}
2 // RUN: clang-import-test -x objective-c++ -Xcc -fobjc-exceptions -dump-ast -import %S/Inputs/F.m -expression %s | FileCheck %s
4 // FIXME: Seems that Objective-C try/catch crash codegen on Windows. Reenable once this is fixed.
5 // UNSUPPORTED: system-windows
7 // CHECK: ObjCAtTryStmt
8 // CHECK-NEXT: CompoundStmt
9 // CHECK-NEXT: DeclStmt
10 // CHECK-NEXT: VarDecl
11 // CHECK-NEXT: ObjCAtThrowStmt
12 // CHECK-NEXT: ImplicitCastExpr
13 // CHECK-NEXT: DeclRefExpr
14 // CHECK-NEXT: ObjCAtCatchStmt
15 // CHECK-NEXT: VarDecl
16 // CHECK-SAME: varname
17 // CHECK-SAME: 'Exception *'
18 // CHECK-NEXT: CompoundStmt
19 // CHECK-NEXT: ObjCAtFinallyStmt
20 // CHECK-NEXT: CompoundStmt
22 // CHECK-NEXT: ObjCAtTryStmt
23 // CHECK-NEXT: CompoundStmt
24 // CHECK-NEXT: ObjCAtCatchStmt
25 // CHECK-NEXT: VarDecl
26 // CHECK-SAME: varname1
27 // CHECK-SAME: 'Exception *'
28 // CHECK-NEXT: CompoundStmt
29 // CHECK-NEXT: ObjCAtThrowStmt
30 // CHECK-NEXT: <<NULL>>
31 // CHECK-NEXT: ObjCAtCatchStmt
32 // CHECK-NEXT: VarDecl
33 // CHECK-SAME: varname2
34 // CHECK-SAME: 'OtherException *'
35 // CHECK-NEXT: CompoundStmt
37 // CHECK-NEXT: ObjCAtTryStmt
38 // CHECK-NEXT: CompoundStmt
39 // CHECK-NEXT: ObjCAtFinallyStmt
40 // CHECK-NEXT: CompoundStmt
42 void expr() {
43   f();