[PATCH] D71300: [clangd] Deduplicate refs from index for cross-file rename.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 11 00:04:23 PST 2019
hokein added a comment.
thanks for the fast review.
================
Comment at: clang-tools-extra/clangd/unittests/RenameTests.cpp:34
+// Covnert a Range to a Ref.
+std::pair<Ref, /*URI storage*/ std::string> toRef(const clangd::Range &Range,
+ llvm::StringRef Path) {
----------------
ilya-biryukov wrote:
> - Returning both storage and `Ref` is quite a complicated interface. Could we rely on the clients to pass strings with URIs instead? It's not a lot of code to create URIs.
> - I think the function name might end up a little confusing when reading the code using it (it certainly did for me). Could we rename it to `refWithRange`? That seems to describe what this function is doing more accurately.
agree, this is a good point. thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71300/new/
https://reviews.llvm.org/D71300
More information about the cfe-commits
mailing list