[cfe-commits] [PATCH] Implement AST dumper for Decls

Philip Craig reviews at llvm-reviews.chandlerc.com
Fri Sep 28 02:15:20 PDT 2012


Hi alexfh,

This patch changes clang -ast-dump so that it dumps Decls in the same format that it already uses for Stmts.

This is an early version of the patch. I would like feedback about whether the general approach is okay.

There's two main changes in the patch. Later versions of the patch will split these into separate patches. The first change is to move parts of StmtDumper that aren't specific to Stmts into the new ASTDumper class. The second change is to create the new DeclDumper class, and change Decl::dump and StmtDumper to use it.

The main work still to do is to fill out DeclDumper to handle more types of Decl, adding tests in the process.

http://llvm-reviews.chandlerc.com/D52

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52.1.patch
Type: text/x-patch
Size: 22765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120928/4d2dc6d8/attachment.bin>


More information about the cfe-commits mailing list