summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2018-12-03 21:05:52 +0000
committerStephen Kelly <steveire@gmail.com>2018-12-03 21:05:52 +0000
commit91f9c9cd7af2f6b4ab2d966252646ed438d086f2 (patch)
tree3ca6b552cd852420ca76617b88340379b6b777e3
parentcf439eda2dca7f261d6f06d6734ddda6b7f1c2ec (diff)
downloadbcm5719-llvm-91f9c9cd7af2f6b4ab2d966252646ed438d086f2.tar.gz
bcm5719-llvm-91f9c9cd7af2f6b4ab2d966252646ed438d086f2.zip
NFC: Simplify dumpStmt child handling
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55068 llvm-svn: 348189
-rw-r--r--clang/lib/AST/ASTDumper.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index fb7804770fa..8007282fe48 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -1989,18 +1989,13 @@ void ASTDumper::dumpStmt(const Stmt *S) {
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);
});
OpenPOWER on IntegriCloud