[clang-tools-extra] r373435 - [clangd] Always send file URIs to editors

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 2 02:12:01 PDT 2019


Author: kadircet
Date: Wed Oct  2 02:12:01 2019
New Revision: 373435

URL: http://llvm.org/viewvc/llvm-project?rev=373435&view=rev
Log:
[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

Modified:
    clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp

Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp?rev=373435&r1=373434&r2=373435&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp Wed Oct  2 02:12:01 2019
@@ -700,7 +700,7 @@ void ClangdLSPServer::onCommand(const Ex
       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().




More information about the cfe-commits mailing list