[PATCH] D68324: [clangd] Always send file URIs to editors
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 2 01:57:36 PDT 2019
kadircet created this revision.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
kadircet added a reviewer: sammccall.
Editors only know about file URIs, make sure we do not use any custom
schemes while sending edits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D68324
Files:
clang-tools-extra/clangd/ClangdLSPServer.cpp
Index: clang-tools-extra/clangd/ClangdLSPServer.cpp
===================================================================
--- clang-tools-extra/clangd/ClangdLSPServer.cpp
+++ clang-tools-extra/clangd/ClangdLSPServer.cpp
@@ -700,7 +700,7 @@
WorkspaceEdit WE;
WE.changes.emplace();
for (const auto &It : R->ApplyEdits) {
- (*WE.changes)[URI::create(It.first()).toString()] =
+ (*WE.changes)[URI::createFile(It.first()).toString()] =
It.second.asTextEdits();
}
// ApplyEdit will take care of calling Reply().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68324.222772.patch
Type: text/x-patch
Size: 566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191002/7e548f1e/attachment.bin>
More information about the cfe-commits
mailing list