summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/ast-dump-decl.mm
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
commit90ff6078946e4d9e655fad69e50831ed2e0256a0 (patch)
tree74f0be48372bc356d027135cccf246304b7ca4e7 /clang/test/Misc/ast-dump-decl.mm
parent04e92149a1578a714c36963405039c52ef0f5a48 (diff)
downloadbcm5719-llvm-90ff6078946e4d9e655fad69e50831ed2e0256a0.tar.gz
bcm5719-llvm-90ff6078946e4d9e655fad69e50831ed2e0256a0.zip
Implement AST dumper for Decls.
http://llvm-reviews.chandlerc.com/D52 Patch by Philip Craig! llvm-svn: 170634
Diffstat (limited to 'clang/test/Misc/ast-dump-decl.mm')
-rw-r--r--clang/test/Misc/ast-dump-decl.mm23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/Misc/ast-dump-decl.mm b/clang/test/Misc/ast-dump-decl.mm
new file mode 100644
index 00000000000..06ab5155110
--- /dev/null
+++ b/clang/test/Misc/ast-dump-decl.mm
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -Wno-unused -fblocks -ast-dump -ast-dump-filter Test %s | FileCheck -strict-whitespace %s
+
+@interface A
+@end
+
+@interface TestObjCImplementation : A
+@end
+
+@implementation TestObjCImplementation : A {
+ struct X {
+ int i;
+ } X;
+}
+- (void) foo {
+}
+@end
+// CHECK: ObjCImplementationDecl{{.*}} TestObjCImplementation
+// CHECK-NEXT: super ObjCInterface{{.*}} 'A'
+// CHECK-NEXT: ObjCInterface{{.*}} 'TestObjCImplementation'
+// CHECK-NEXT: CXXCtorInitializer{{.*}} 'X'
+// CHECK-NEXT: CXXConstructExpr
+// CHECK-NEXT: ObjCIvarDecl{{.*}} X
+// CHECK-NEXT: ObjCMethodDecl{{.*}} foo
OpenPOWER on IntegriCloud