From: Stephen Kelly Date: Sun, 9 Dec 2018 13:24:40 +0000 (+0000) Subject: Revert "Introduce optional labels to dumpStmt" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=116ea9b084305036c0c6fb17c1ad8768e78dacf5;p=clang Revert "Introduce optional labels to dumpStmt" This reverts commit 933402caa09963792058198578522a95f013c69c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348718 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index d1d7097a64..b95813ed7c 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -83,8 +83,7 @@ namespace { void setDeserialize(bool D) { Deserialize = D; } void dumpDecl(const Decl *D); - void dumpStmt(const Stmt *S, const char *label = nullptr); - void dumpStmtImpl(const Stmt *S); + void dumpStmt(const Stmt *S); // Utilities void dumpType(QualType T) { NodeDumper.dumpType(T); } @@ -1712,18 +1711,7 @@ void ASTDumper::VisitBlockDecl(const BlockDecl *D) { // Stmt dumping methods. //===----------------------------------------------------------------------===// -void ASTDumper::dumpStmt(const Stmt *S, const char *label) { - if (label) { - dumpChild([=] { - OS << label; - dumpStmtImpl(S); - }); - } else { - dumpStmtImpl(S); - } -} - -void ASTDumper::dumpStmtImpl(const Stmt *S) { +void ASTDumper::dumpStmt(const Stmt *S) { dumpChild([=] { if (!S) { ColorScope Color(OS, ShowColors, NullColor); @@ -1990,7 +1978,10 @@ void ASTDumper::VisitInitListExpr(const InitListExpr *ILE) { NodeDumper.dumpBareDeclRef(Field); } if (auto *Filler = ILE->getArrayFiller()) { - dumpStmt(Filler, "array filler"); + dumpChild([=] { + OS << "array filler"; + dumpStmt(Filler); + }); } }