summaryrefslogtreecommitdiffstats
path: root/test/Tooling/clang-check-ast-dump.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2012-12-20 02:09:13 +0000
committerAlexander Kornienko <alexfh@google.com>2012-12-20 02:09:13 +0000
commitd538ed9b2a617239d5bd56357663de62f6f9224c (patch)
tree4d89b1886df14de8f283d0916da56ee1c0b2c3c0 /test/Tooling/clang-check-ast-dump.cpp
parentbf53dfac8195835028bd6347433f7dbebcc29fc1 (diff)
Implement AST dumper for Decls.
http://llvm-reviews.chandlerc.com/D52 Patch by Philip Craig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Tooling/clang-check-ast-dump.cpp')
-rw-r--r--test/Tooling/clang-check-ast-dump.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/Tooling/clang-check-ast-dump.cpp b/test/Tooling/clang-check-ast-dump.cpp
index 6e03f82d0f..90827e10b7 100644
--- a/test/Tooling/clang-check-ast-dump.cpp
+++ b/test/Tooling/clang-check-ast-dump.cpp
@@ -1,15 +1,19 @@
// RUN: clang-check -ast-dump "%s" -- 2>&1 | FileCheck %s
-// CHECK: namespace test_namespace
-// CHECK-NEXT: class TheClass
-// CHECK: int theMethod(int x) (CompoundStmt
+// CHECK: (NamespaceDecl{{.*}}test_namespace
+// CHECK-NEXT: (CXXRecordDecl{{.*}}TheClass
+// CHECK: (CXXMethodDecl{{.*}}theMethod
+// CHECK-NEXT: (ParmVarDecl{{.*}}x
+// CHECK-NEXT: (CompoundStmt
// CHECK-NEXT: (ReturnStmt
// CHECK-NEXT: (BinaryOperator
//
// RUN: clang-check -ast-dump -ast-dump-filter test_namespace::TheClass::theMethod "%s" -- 2>&1 | FileCheck -check-prefix CHECK-FILTER %s
-// CHECK-FILTER-NOT: namespace test_namespace
-// CHECK-FILTER-NOT: class TheClass
+// CHECK-FILTER-NOT: NamespaceDecl
+// CHECK-FILTER-NOT: CXXRecordDecl
// CHECK-FILTER: {{^}}Dumping test_namespace::TheClass::theMethod
-// CHECK-FILTER-NEXT: {{^}}int theMethod(int x) (CompoundStmt
+// CHECK-FILTER-NEXT: {{^}}(CXXMethodDecl{{.*}}theMethod
+// CHECK-FILTER-NEXT: (ParmVarDecl{{.*}}x
+// CHECK-FILTER-NEXT: (CompoundStmt
// CHECK-FILTER-NEXT: (ReturnStmt
// CHECK-FILTER-NEXT: (BinaryOperator
//
@@ -26,7 +30,8 @@
//
// RUN: clang-check -ast-dump -ast-dump-filter test_namespace::TheClass::n "%s" -- 2>&1 | FileCheck -check-prefix CHECK-ATTR %s
// CHECK-ATTR: test_namespace
-// CHECK-ATTR-NEXT: int n __attribute__((aligned((BinaryOperator
+// CHECK-ATTR-NEXT: (FieldDecl{{.*}}n
+// FIXME: attribute dumping not implemented yet
//
// RUN: clang-check -ast-dump -ast-dump-filter test_namespace::AfterNullNode "%s" -- 2>&1 | FileCheck -check-prefix CHECK-AFTER-NULL %s
// CHECK-AFTER-NULL: class AfterNullNode