summaryrefslogtreecommitdiffstats
path: root/test/Misc/ast-dump-stmt.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/Misc/ast-dump-stmt.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/Misc/ast-dump-stmt.cpp')
-rw-r--r--test/Misc/ast-dump-stmt.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/Misc/ast-dump-stmt.cpp b/test/Misc/ast-dump-stmt.cpp
index cf3e8bf..72205c1 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 (...) {
+ }
+}
OpenPOWER on IntegriCloud