[clangd] Always send file URIs to editors
Summary:
Editors only know about file URIs, make sure we do not use any custom
schemes while sending edits.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68324
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@373435 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/clangd/ClangdLSPServer.cpp b/clangd/ClangdLSPServer.cpp
index 4ac4d95..692bd24 100644
--- a/clangd/ClangdLSPServer.cpp
+++ b/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().