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