f4a2713ac8
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
40 lines
882 B
C++
40 lines
882 B
C++
// RUN: %clang_cc1 -fcxx-exceptions -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s
|
|
|
|
namespace n {
|
|
void function() {}
|
|
int Variable;
|
|
}
|
|
using n::function;
|
|
using n::Variable;
|
|
void TestFunction() {
|
|
void (*f)() = &function;
|
|
// CHECK: DeclRefExpr{{.*}} (UsingShadow{{.*}}function
|
|
Variable = 4;
|
|
// CHECK: DeclRefExpr{{.*}} (UsingShadow{{.*}}Variable
|
|
}
|
|
|
|
// CHECK: FunctionDecl {{.*}} TestCatch1
|
|
void TestCatch1() {
|
|
// CHECK: CXXTryStmt
|
|
// CHECK-NEXT: CompoundStmt
|
|
try {
|
|
}
|
|
// CHECK-NEXT: CXXCatchStmt
|
|
// CHECK-NEXT: VarDecl {{.*}} x
|
|
// CHECK-NEXT: CompoundStmt
|
|
catch (int x) {
|
|
}
|
|
}
|
|
|
|
// CHECK: FunctionDecl {{.*}} TestCatch2
|
|
void TestCatch2() {
|
|
// CHECK: CXXTryStmt
|
|
// CHECK-NEXT: CompoundStmt
|
|
try {
|
|
}
|
|
// CHECK-NEXT: CXXCatchStmt
|
|
// CHECK-NEXT: NULL
|
|
// CHECK-NEXT: CompoundStmt
|
|
catch (...) {
|
|
}
|
|
}
|