nridge added a comment. In D72041#1800189 <https://reviews.llvm.org/D72041#1800189>, @sammccall wrote:
> - the allSelectedNodes API on SelectionTree feels non-orthogonal: it's only > meaningful here because the input happened to be a point and thus touches a > single token and therefore node. If the input was a range, then this API > doesn't help, because it loses the sense of "topmost" node. Good point! > - maybe the function we want walks down the tree as if finding the common > ancestor, but may descend to return the roots of multiple subtrees if they > are located in distinct expansions of the same macro arg > - or maybe we just want to treat non-first expansions as not-selected? That > would about this issue I think I'm thinking of going with the second suggestion, because it doesn't require changes to the SelectionTree API, and therefore addresses this concern: > - it seems unfortunate to solve this mostly in xrefs rather than mostly in > SelectionTree. All the other clients potentially want this behavior. without touching all the clients of SelectionTree. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72041/new/ https://reviews.llvm.org/D72041 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits