steveire updated this revision to Diff 175956. steveire added a comment. Use isa instead of dyn_cast
Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55068/new/ https://reviews.llvm.org/D55068 Files: lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ lib/AST/ASTDumper.cpp @@ -1984,18 +1984,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: lib/AST/ASTDumper.cpp =================================================================== --- lib/AST/ASTDumper.cpp +++ lib/AST/ASTDumper.cpp @@ -1984,18 +1984,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