]> granicus.if.org Git - clang/commitdiff
Removed VisitDeclStmt(). The initializers of a DeclStmt are now automatically
authorTed Kremenek <kremenek@apple.com>
Wed, 12 Dec 2007 06:44:12 +0000 (06:44 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 12 Dec 2007 06:44:12 +0000 (06:44 +0000)
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

AST/StmtDumper.cpp

index c6ab29880da066bb98c7acd9094a52d111245c0e..b36c80b237f441e659f4947beaa072d36516d203 100644 (file)
@@ -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());