[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-11-05 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG23657d9cc332: [SyntaxTree] Add reverse links to syntax Nodes. (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-11-04 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 302879. eduucaldas added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90240/new/ https://reviews.llvm.org/D90240 Files: clang/include/clang/Tooling/Syntax/Tree.h clang/lib/Tooling/Syn

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-11-04 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. As we discussed offline we will probably not provide `replaceChildRange` in the public mutations API anymore. As a result I don't think we should be chaining changes related to `replaceChildRange` in this patch, and thus it should be ready to go. Repository: rG L

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-28 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 301315. eduucaldas marked 9 inline comments as done. eduucaldas added a comment. Answered all comments but: - Add tests for `replaceChildRangeLowLevel` - Asymmetry of `replaceChildRangeLowLevel`, do we need to separate children of the replaced range? Re

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-28 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 301256. eduucaldas added a comment. I was silly on the last rebase. Ignore this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90240/new/ https://reviews.llvm.org/D90240 Files: clang/include/clang/Tooling

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-28 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 301255. eduucaldas added a comment. Rebase to include ChildIterator patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90240/new/ https://reviews.llvm.org/D90240 Files: clang/include/clang/Tooling/Synta

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-28 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:188 + /// Similar but appends. + void appendChildLowLevel(Node *Child, NodeRole Role); + This is a complete nitpick, but could you put append before prepend? I think a lot

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. LG from my side. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:189 /// EXPECTS: Child->Role != Detached void prependChildLowLevel(Node *Child); friend class TreeBuilder; eduucaldas wrote: > eduucaldas wrote: > > sammc

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-28 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas marked 2 inline comments as done. eduucaldas added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:109 Node *getNextSibling() { return NextSibling; } + const Node *getPreviousSibling() const { return PreviousSibling; } + Node *getPreviousSib

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-28 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 301198. eduucaldas marked 3 inline comments as done. eduucaldas added a comment. - `replaceChildRangeLowLevel` now takes Begin instead of BeforeBegin - `appendChildLowLevel` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:109 Node *getNextSibling() { return NextSibling; } + const Node *getPreviousSibling() const { return PreviousSibling; } + Node *getPreviousSibling() { return PreviousSibling; } ---

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-27 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:189 /// EXPECTS: Child->Role != Detached void prependChildLowLevel(Node *Child); friend class TreeBuilder; eduucaldas wrote: > Should we provide an `appendChildLowLev

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-27 Thread Eduardo Caldas via Phabricator via cfe-commits
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 TreeBu

[PATCH] D90240: [SyntaxTree] Add reverse links to syntax Nodes.

2020-10-27 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Rationale: Children of a syntax tree had forward links only, because there was no need for reverse links. This need appeared when we started mutat