gribozavr2 added inline comments.
================ Comment at: clang/include/clang/Tooling/Syntax/Tree.h:129 + void SetRole(NodeRole NR); + ---------------- `setRole()` (in new code). ================ Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:975 + const syntax::Token *TemplateKW, + syntax::SimpleDeclaration *InnerDeclaration) { assert(!ExternKW || ExternKW->kind() == tok::kw_extern); ---------------- hlopko wrote: > gribozavr2 wrote: > > Add a `Decl *From` parameter and pass it through to `Builder.foldNode()` > > below? > Done, but to get rid of all nullptr parents in BuildTree.cpp we'd have to > implement support for Types in the AST mapping. Let's not do that in this > patch. For consistency with, for example, `foldTemplateDeclaration`, I think `Decl *From` should be the last parameter. ================ Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:264 + /// getRange() finds the syntax tokens corresponding to the \p SourceRange. + llvm::ArrayRef<syntax::Token> getRange(SourceRange Range) const { ---------------- Don't repeat the function name in comments. `/// Finds the syntax tokens that correspond to the provided \c SourceRange.` ================ Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:270 + /// getRange() finds the syntax tokens corresponding to the passed source /// locations. ---------------- Ditto. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76355/new/ https://reviews.llvm.org/D76355 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits