[PATCH] D55068: NFC: Simplify dumpStmt child handling

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 13:09:09 PST 2018


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);
   });


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55068.176462.patch
Type: text/x-patch
Size: 781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181203/e980e8c0/attachment.bin>


More information about the cfe-commits mailing list