1 // RUN: %clang_cc1 -fcxx-exceptions -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s 2 3 namespace n { 4 void function() {} 5 int Variable; 6 } 7 using n::function; 8 using n::Variable; 9 void TestFunction() { 10 void (*f)() = &function; 11 // CHECK: DeclRefExpr{{.*}} (UsingShadow{{.*}}function 12 Variable = 4; 13 // CHECK: DeclRefExpr{{.*}} (UsingShadow{{.*}}Variable 14 } 15 16 // CHECK: FunctionDecl {{.*}} TestCatch1 17 void TestCatch1() { 18 // CHECK: CXXTryStmt 19 // CHECK-NEXT: CompoundStmt 20 try { 21 } 22 // CHECK-NEXT: CXXCatchStmt 23 // CHECK-NEXT: VarDecl {{.*}} x 24 // CHECK-NEXT: CompoundStmt 25 catch (int x) { 26 } 27 } 28 29 // CHECK: FunctionDecl {{.*}} TestCatch2 30 void TestCatch2() { 31 // CHECK: CXXTryStmt 32 // CHECK-NEXT: CompoundStmt 33 try { 34 } 35 // CHECK-NEXT: CXXCatchStmt 36 // CHECK-NEXT: NULL 37 // CHECK-NEXT: CompoundStmt 38 catch (...) { 39 } 40 } 41