From: Ted Kremenek Date: Wed, 12 Dec 2007 06:44:12 +0000 (+0000) Subject: Removed VisitDeclStmt(). The initializers of a DeclStmt are now automatically X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f155e461ce8b48f56110f1b0914b85c367a1f58e;p=clang Removed VisitDeclStmt(). The initializers of a DeclStmt are now automatically printed out by DumpSubTree() via the child_iterator interface. This fixes a bug where the initializers were being dumped twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44920 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/StmtDumper.cpp b/AST/StmtDumper.cpp index c6ab29880d..b36c80b237 100644 --- a/AST/StmtDumper.cpp +++ b/AST/StmtDumper.cpp @@ -102,7 +102,6 @@ namespace { // Stmts. void VisitStmt(Stmt *Node); - void VisitDeclStmt(DeclStmt *Node); void VisitLabelStmt(LabelStmt *Node); void VisitGotoStmt(GotoStmt *Node); @@ -233,20 +232,6 @@ void StmtDumper::DumpDeclarator(Decl *D) { } } -void StmtDumper::VisitDeclStmt(DeclStmt *Node) { - DumpStmt(Node); - fprintf(F, "\n"); - for (ScopedDecl *D = Node->getDecl(); D; D = D->getNextDeclarator()) { - ++IndentLevel; - Indent(); - fprintf(F, "%p ", (void*)D); - DumpDeclarator(D); - if (D->getNextDeclarator()) - fprintf(F, "\n"); - --IndentLevel; - } -} - void StmtDumper::VisitLabelStmt(LabelStmt *Node) { DumpStmt(Node); fprintf(F, " '%s'\n", Node->getName());