sam-mccall wrote:

I don't know that this class brings enough value to warrant the dependency - we 
don't really seem to be simplifying the code, we're mostly just using it as a 
fancy `vector<string>`.

(For some context: we went to some effort in the past to untangle this from 
tooling/Refactoring/Rename, and a lot of pieces of clangd make tradeoffs 
between keeping design simple and handling all the special cases of C, C++, 
ObjC precisely).

Is the underlying goal here to be able to use `adjustRenameRanges` from outside 
of clangd? (That's my reading of "finding the ranges to rename based on an 
index that’s not clangd’s built-in index" - if you were doing this inside 
clangd, ISTM you'd have a Selector regardless of the index used).
We don't use the selector for anything other than the text chunks it contains, 
so I think you could just replace `optional<Selector>` with 
`optional<vector<StringRef>>` there.

(I don't think there are any plans to make use of Selector in other ways, 
@kadircet @DavidGoldman would know)

https://github.com/llvm/llvm-project/pull/82061
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to