From 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 2 Dec 2012 13:20:44 +0000 Subject: Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2): http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974 --- lib/Frontend/ASTConsumers.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Frontend/ASTConsumers.cpp') diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp index 0f0d8352046d1..882d400c42922 100644 --- a/lib/Frontend/ASTConsumers.cpp +++ b/lib/Frontend/ASTConsumers.cpp @@ -58,7 +58,7 @@ namespace { bool shouldWalkTypesOfTypeLocs() const { return false; } bool TraverseDecl(Decl *D) { - if (filterMatches(D)) { + if (D != NULL && filterMatches(D)) { Out.changeColor(llvm::raw_ostream::BLUE) << (Dump ? "Dumping " : "Printing ") << getName(D) << ":\n"; Out.resetColor(); @@ -66,6 +66,7 @@ namespace { D->dump(Out); else D->print(Out, /*Indentation=*/0, /*PrintInstantiation=*/true); + Out << "\n"; // Don't traverse child nodes to avoid output duplication. return true; } @@ -89,8 +90,6 @@ namespace { class ASTDeclNodeLister : public ASTConsumer, public RecursiveASTVisitor { - typedef RecursiveASTVisitor base; - public: ASTDeclNodeLister(raw_ostream *Out = NULL) : Out(Out ? *Out : llvm::outs()) {} -- cgit v1.2.3