From: Stephen Kelly Date: Mon, 3 Dec 2018 21:05:52 +0000 (+0000) Subject: NFC: Simplify dumpStmt child handling X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e3f79d2ae612819d80f44c3b1a454063d2c8c85;p=clang NFC: Simplify dumpStmt child handling Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55068 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348189 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index fb7804770f..8007282fe4 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -1989,18 +1989,13 @@ void ASTDumper::dumpStmt(const Stmt *S) { return; } + ConstStmtVisitor::Visit(S); + // Some statements have custom mechanisms for dumping their children. - if (const DeclStmt *DS = dyn_cast(S)) { - VisitDeclStmt(DS); - return; - } - if (const GenericSelectionExpr *GSE = dyn_cast(S)) { - VisitGenericSelectionExpr(GSE); + if (isa(S) || isa(S)) { return; } - ConstStmtVisitor::Visit(S); - for (const Stmt *SubStmt : S->children()) dumpStmt(SubStmt); });