steveire added inline comments.
================ Comment at: lib/AST/ASTDumper.cpp:89 void dumpDecl(const Decl *D); - void dumpStmt(const Stmt *S); + void dumpStmt(const Stmt *S, const std::string &label = {}); ---------------- aaron.ballman wrote: > Label > > Rather than using `{}`, how about `""` (same behavior, but looks more > idiomatic). > > Why `std::string` instead of `StringRef`? I expect this will be called mostly > with string literals, which saves an allocation. The other labels are using > `const char *`, which would be another reasonable option. Whatever we go > with, it'd be nice to make the label types agree across the calls. The actual print in TextTreeStructure is deferred, so it can't be `const char*` or `StringRef`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55488/new/ https://reviews.llvm.org/D55488 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits