sammccall added inline comments.
================ Comment at: clang-tools-extra/clangd/refactor/Tweak.h:51 + /// The Length of the selection + unsigned SelectionLength; /// The AST nodes that were selected. ---------------- kadircet wrote: > SureYeaah wrote: > > kadircet wrote: > > > maybe expose a `SourceLocation SelectionEnd` ? > > Should I also have a SelectionStart? Or just use Cursor? > I think it makes more sense to have `SelectionBegin` than `Cursor, AFAIK we > usually don't have a notion of `Cursor` when provided with a selection. > It only makes sense for inputs coming from clients like vim, in which you > only have a cursor rather then a selection. But I would like to know what > @sammccall thinks about it as well. I'd suggest `unsigned SelectionStart, SelectionEnd` as it more clearly communicates this is main-file only and can be easily used with `Code`. I'd add a FIXME to remove Cursor as it's redundant (we can replace it with a method) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64912/new/ https://reviews.llvm.org/D64912 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits