diff options
author | Pavel Labath <labath@google.com> | 2013-09-04 14:35:00 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2013-09-04 14:35:00 +0000 |
commit | 1ef8342e11bd6750d1d6e0ffdabbf596d8bd09de (patch) | |
tree | 732134872f1482559fd6a1139ef43b3b8f61ab00 /clang/test/Misc/ast-dump-stmt.cpp | |
parent | 7a0423468e41b32a82791dd9a3f41aff1f8855cb (diff) | |
download | bcm5719-llvm-1ef8342e11bd6750d1d6e0ffdabbf596d8bd09de.tar.gz bcm5719-llvm-1ef8342e11bd6750d1d6e0ffdabbf596d8bd09de.zip |
ASTDumper: fix dump of CXXCatchStmt
Summary: I added the display of the VarDecl contained in the statement.
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1596
llvm-svn: 189941
Diffstat (limited to 'clang/test/Misc/ast-dump-stmt.cpp')
-rw-r--r-- | clang/test/Misc/ast-dump-stmt.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/clang/test/Misc/ast-dump-stmt.cpp b/clang/test/Misc/ast-dump-stmt.cpp index cf3e8bf2898..72205c130e0 100644 --- a/clang/test/Misc/ast-dump-stmt.cpp +++ b/clang/test/Misc/ast-dump-stmt.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -fcxx-exceptions -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s namespace n { void function() {} @@ -12,3 +12,29 @@ void TestFunction() { 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 (...) { + } +} |