[PATCH] D55068: NFC: Simplify dumpStmt child handling
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 29 11:36:27 PST 2018
steveire created this revision.
steveire added a reviewer: aaron.ballman.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
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 (dyn_cast<DeclStmt>(S) || dyn_cast<GenericSelectionExpr>(S)) {
return;
}
- ConstStmtVisitor<ASTDumper>::Visit(S);
-
for (const Stmt *SubStmt : S->children())
dumpStmt(SubStmt);
});
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55068.175911.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181129/6da05308/attachment-0001.bin>
More information about the cfe-commits
mailing list