Commit Graph

7 Commits

Author SHA1 Message Date
Eli Friedman 1730424516 Add a hack to prevent us from printing out the __builtin_va_list
declaration in -ast-print mode.

llvm-svn: 72615
2009-05-30 06:35:22 +00:00
Douglas Gregor 3bc6e4c72a Printing for using directives, e.g.,
using namespace std::debug;

Extended UsingDirectiveDecl to store the nested-name-specifier that
precedes the nominated namespace.

llvm-svn: 72614
2009-05-30 06:31:56 +00:00
Douglas Gregor 2d042f1cf4 Never suppress specifiers when printing the parameters of a function
declaration.

llvm-svn: 72613
2009-05-30 05:39:39 +00:00
Eli Friedman ef334fdfa2 Add a Stmt::printPretty overload which takes an ASTContext; start
transitioning callers over to pass one in.

llvm-svn: 72609
2009-05-30 05:03:24 +00:00
Eli Friedman 796358498f Expose an API to print a group of decls (like "int a,b;").
Make StmtPrinter use DeclPrinter to print all declarations.  Merge 
declarations in the limited case of an unnamed TagDecl followed by one 
or more declarations using that TagDecl directly.  Change
SuppressTypeSpecifiers to the more general SuppressSpecifiers, and 
use it to suppress stuff like "typedef" and "extern".  Replace 
OwnedTag with SuppressTag, since it's more convenient to print 
declarations from DeclPrinter at the moment.  
improvements to declaration printing.  Fix pretty-printing for K&R 
function definitions and __builtin_va_arg.

We're now to the point where the pretty-printing output for non-trivial 
programs can actually be piped back into clang.

llvm-svn: 72608
2009-05-30 04:20:30 +00:00
Douglas Gregor 36098ff480 Clean up printing for Objective-C, designated initializers.
llvm-svn: 72602
2009-05-30 00:56:08 +00:00
Douglas Gregor 278f52ec29 Refactor and clean up the AST printer, so that it uses a DeclVisitor,
walks through DeclContexts properly, and prints more of the
information available in the AST. The functionality is still available
via -ast-print, -ast-dump, etc., and also via the new member functions
Decl::dump() and Decl::print().

llvm-svn: 72597
2009-05-30 00:08:05 +00:00