This revision was automatically updated to reflect the committed changes. Closed by commit rL348189: NFC: Simplify dumpStmt child handling (authored by steveire, committed by ). Herald added a subscriber: llvm-commits.
Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55068/new/ https://reviews.llvm.org/D55068 Files: cfe/trunk/lib/AST/ASTDumper.cpp Index: cfe/trunk/lib/AST/ASTDumper.cpp =================================================================== --- cfe/trunk/lib/AST/ASTDumper.cpp +++ cfe/trunk/lib/AST/ASTDumper.cpp @@ -1989,18 +1989,13 @@ return; } + ConstStmtVisitor<ASTDumper>::Visit(S); + // Some statements have custom mechanisms for dumping their children. - if (const DeclStmt *DS = dyn_cast<DeclStmt>(S)) { - VisitDeclStmt(DS); - return; - } - if (const GenericSelectionExpr *GSE = dyn_cast<GenericSelectionExpr>(S)) { - VisitGenericSelectionExpr(GSE); + if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S)) { return; } - ConstStmtVisitor<ASTDumper>::Visit(S); - for (const Stmt *SubStmt : S->children()) dumpStmt(SubStmt); });
Index: cfe/trunk/lib/AST/ASTDumper.cpp =================================================================== --- cfe/trunk/lib/AST/ASTDumper.cpp +++ cfe/trunk/lib/AST/ASTDumper.cpp @@ -1989,18 +1989,13 @@ return; } + ConstStmtVisitor<ASTDumper>::Visit(S); + // Some statements have custom mechanisms for dumping their children. - if (const DeclStmt *DS = dyn_cast<DeclStmt>(S)) { - VisitDeclStmt(DS); - return; - } - if (const GenericSelectionExpr *GSE = dyn_cast<GenericSelectionExpr>(S)) { - VisitGenericSelectionExpr(GSE); + if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S)) { return; } - ConstStmtVisitor<ASTDumper>::Visit(S); - for (const Stmt *SubStmt : S->children()) dumpStmt(SubStmt); });
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits