Skip to content

Commit 91f9c9c

Browse files
committed
NFC: Simplify dumpStmt child handling
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55068 llvm-svn: 348189
1 parent cf439ed commit 91f9c9c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

clang/lib/AST/ASTDumper.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,18 +1989,13 @@ void ASTDumper::dumpStmt(const Stmt *S) {
19891989
return;
19901990
}
19911991

1992+
ConstStmtVisitor<ASTDumper>::Visit(S);
1993+
19921994
// Some statements have custom mechanisms for dumping their children.
1993-
if (const DeclStmt *DS = dyn_cast<DeclStmt>(S)) {
1994-
VisitDeclStmt(DS);
1995-
return;
1996-
}
1997-
if (const GenericSelectionExpr *GSE = dyn_cast<GenericSelectionExpr>(S)) {
1998-
VisitGenericSelectionExpr(GSE);
1995+
if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S)) {
19991996
return;
20001997
}
20011998

2002-
ConstStmtVisitor<ASTDumper>::Visit(S);
2003-
20041999
for (const Stmt *SubStmt : S->children())
20052000
dumpStmt(SubStmt);
20062001
});

0 commit comments

Comments
 (0)