[PATCH] D71300: [clangd] Deduplicate refs from index for cross-file rename.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 10 22:25:36 PST 2019
ilya-biryukov added a comment.
The fix itself LGTM. Just a few NITs and this is good to go.
================
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) {
----------------
- 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.
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