Re: [PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-28 Thread Sam McCall via cfe-commits
Ah, thanks a lot, sorry for missing that! On Wed, Oct 28, 2020 at 4:41 PM Simon Pilgrim via Phabricator < revi...@reviews.llvm.org> wrote: > RKSimon added a comment. > > @sammccall I've pushed rGc0053c62d9a0 < > https://reviews.llvm.org/rGc0053c62d9a0b798b42686499de9bb2e7391b111> to > fix MSVC bu

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-28 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. @sammccall I've pushed rGc0053c62d9a0 to fix MSVC builds which were struggling to find a default constructor for ConstChildIterator http://lab.llvm.org:8011/#/builders/83 Repository: rG LLVM Gith

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-28 Thread Sam McCall 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 rGd4934eb5f876: [Syntax] Add iterators over children of syntax trees. (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D90

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-26 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas accepted this revision. eduucaldas added a comment. Thanks for the instructive replies Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90023/new/ https://reviews.llvm.org/D90023 ___ cfe-commits

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-26 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:182 +/// The element, or nullptr if past-the-end. +NodeT *asPointer() const { return N; } + }; sammccall wrote: > gribozavr2 wrote: > > "nodePointer()" ? > I find thi

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 300691. sammccall marked an inline comment as done. sammccall added a comment. Simplify ConstChildIterator cross-constructor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90023/new/ https://reviews.llvm.org/D

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:182 +/// The element, or nullptr if past-the-end. +NodeT *asPointer() const { return N; } + }; gribozavr2 wrote: > "nodePoi

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-26 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:182 +/// The element, or nullptr if past-the-end. +NodeT *asPointer() const { return N; } + };

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 300674. sammccall marked an inline comment as done. sammccall added a comment. Style changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90023/new/ https://reviews.llvm.org/D90023 Files: clang/include/cl

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:157-184 + /// Iterator over children (common base for const/non-const). + /// Not invalidated by tree mutations (holds a stable node pointer). + template + class child_iterator_base +

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-23 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a comment. Thanks Sam! I learned a lot from your patch ^^ Comment at: clang/include/clang/Tooling/Syntax/Tree.h:157-184 + /// Iterator over children (common base for const/non-const). + /// Not invalidated by tree mutations (holds a stable node pointer). + t

[PATCH] D90023: [Syntax] Add iterators over children of syntax trees.

2020-10-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: gribozavr, eduucaldas. Herald added a project: clang. Herald added a subscriber: cfe-commits. sammccall requested review of this revision. This gives us slightly nicer syntax (foreach) for idioms currently expressed as a loop, and the opt