aaron.ballman added a comment. @rsmith -- do you have opinions on the new format for how we display the child node? I think this is a more clear approach, but a second opinion would be nice.
================ Comment at: include/clang/AST/TextNodeDumper.h:43 + /// Add a child of the current node. + /// Calls doAddChild without arguments + template <typename Fn> ---------------- Why move this comment down a line? Might as well leave it where it was before (feel free to add a full stop to the end of the comment though). ================ Comment at: include/clang/AST/TextNodeDumper.h:45 + template <typename Fn> + void addChild(Fn doAddChild) { + return addChild("", doAddChild); ---------------- doAddChild -> DoAddChild ================ Comment at: include/clang/AST/TextNodeDumper.h:48 + } + /// Add a child of the current node with an optional label. + /// Calls doAddChild without arguments. ---------------- Can you add a newline above this comment to give it some visual space? ================ Comment at: include/clang/AST/TextNodeDumper.h:51 + template <typename Fn> + void addChild(StringRef Label, Fn doAddChild) { // If we're at the top level, there's nothing interesting to do; just ---------------- doAddChild -> DoAddChild ================ Comment at: include/clang/AST/TextNodeDumper.h:68 + // We need to capture an owning-string in the lambda because the lambda + // is invoked in a deffered manner. + std::string LabelStr = Label; ---------------- deffered -> deferred ================ Comment at: include/clang/AST/TextNodeDumper.h:70 + std::string LabelStr = Label; + auto dumpWithIndent = [this, doAddChild, LabelStr](bool isLastChild) { // Print out the appropriate tree structure and work out the prefix for ---------------- dumpWithIndent -> DumpWithIndent isLastChild -> IsLastChild ================ Comment at: include/clang/AST/TextNodeDumper.h:87 OS << Prefix << (isLastChild ? '`' : '|') << '-'; + if (!LabelStr.empty()) { + OS << LabelStr << ": "; ---------------- Elide braces 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