[cfe-commits] [PATCH] Implement AST dumper for Decls
Philip Craig
reviews at llvm-reviews.chandlerc.com
Fri Oct 5 03:36:38 PDT 2012
I've converted the tests to use FileCheck, and I think they've turned out to be simpler and more stable. I've tried to make the tests more focused, so there should only need to be a couple of tests for the indentation and source locations.
Adding an -ast-dump-depth option would make these tests even simpler, so that each test only checks a node and the presence of its immediate children. This option might be generally useful too. It's currently half implemented for Stmts.
I've also fixed all the existing tests that use -ast-dump.
test/Tooling/clang-check-ast-dump.cpp needs attribute dumping, so I've added an incomplete version of that which only dumps the attribute kind.
This update also includes the IndentScope class.
If we're happy this is going in the right direction, should I start splitting this up into a proper patchset and submitting pieces as I go?
Hi alexfh, doug.gregor,
http://llvm-reviews.chandlerc.com/D52
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D52?vs=141&id=151#toc
Files:
include/clang/AST/Stmt.h
lib/AST/ASTDumper.cpp
lib/AST/ASTDumper.h
lib/AST/CMakeLists.txt
lib/AST/DeclDumper.cpp
lib/AST/DeclPrinter.cpp
lib/AST/StmtDumper.cpp
lib/Frontend/ASTConsumers.cpp
test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp
test/CodeGen/bitfield-2.c
test/Misc/ast-dump-decl.c
test/Misc/ast-dump-stmt.c
test/Misc/ast-dump-templates.cpp
test/Misc/ast-dump-wchar.cpp
test/PCH/objc_stmts.m
test/SemaTemplate/default-expr-arguments-2.cpp
test/Tooling/clang-check-ast-dump.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52.4.patch
Type: text/x-patch
Size: 34277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121005/6af36384/attachment.bin>
More information about the cfe-commits
mailing list