From e95e5165960e15cd5382a2d92ed3dbe38b281066 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 2 Oct 2019 09:12:01 +0000 Subject: [PATCH] [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 llvm-svn: 373435 --- clang-tools-extra/clangd/ClangdLSPServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 4ac4d95..692bd24 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -700,7 +700,7 @@ void ClangdLSPServer::onCommand(const ExecuteCommandParams &Params, 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(). -- 2.7.4