diff options
Diffstat (limited to 'test/Misc/ast-dump-stmt.cpp')
| -rw-r--r-- | test/Misc/ast-dump-stmt.cpp | 28 | 
1 files changed, 27 insertions, 1 deletions
diff --git a/test/Misc/ast-dump-stmt.cpp b/test/Misc/ast-dump-stmt.cpp index cf3e8bf28981..72205c130e08 100644 --- a/test/Misc/ast-dump-stmt.cpp +++ b/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 (...) { +  } +}  | 
