aaron.ballman added inline comments.
================
Comment at: lib/AST/ASTDumper.cpp:1987
+ ConstStmtVisitor<ASTDumper>::Visit(S);
+
----------------
Was there something special about calling the Visit methods directly and
bailing out? Your code certainly looks reasonable, but I wonder if the output
is changed because it goes through the `ConstStmtVisitor` instead of directly
dispatching.
================
Comment at: lib/AST/ASTDumper.cpp:1990
// 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;
----------------
These should be `isa<>` checks instead of `dyn_cast<>` checks.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55068/new/
https://reviews.llvm.org/D55068
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits