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


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);
   });
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to