[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.
Eduardo Caldas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 27 08:34:54 PDT 2020
eduucaldas added a reviewer: gribozavr2.
eduucaldas added a subscriber: sammccall.
eduucaldas added inline comments.
================
Comment at: clang/include/clang/Tooling/Syntax/Tree.h:189
/// EXPECTS: Child->Role != Detached
void prependChildLowLevel(Node *Child);
friend class TreeBuilder;
----------------
Should we provide an `appendChildLowLevel` as well?
That has one use inside `foldChildren` in `BuildTree.cpp`.
Currently this function does a reverse iteration prepending children. We could change that into a forward iteration appending. There is no impact in time-complexity. This change would just improve readability inside this function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90240/new/
https://reviews.llvm.org/D90240
More information about the cfe-commits
mailing list