[PATCH] D64912: [Clangd] Changed ExtractVariable to only work on non empty selections
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 18 05:57:12 PDT 2019
kadircet 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:
> > 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.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits