[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
This commit is contained in:
Kadir Cetinkaya 2019-10-02 09:12:01 +00:00
parent c38188c5fe
commit e95e516596
1 changed files with 1 additions and 1 deletions

View File

@ -700,7 +700,7 @@ void ClangdLSPServer::onCommand(const ExecuteCommandParams &Params,
WorkspaceEdit WE; WorkspaceEdit WE;
WE.changes.emplace(); WE.changes.emplace();
for (const auto &It : R->ApplyEdits) { for (const auto &It : R->ApplyEdits) {
(*WE.changes)[URI::create(It.first()).toString()] = (*WE.changes)[URI::createFile(It.first()).toString()] =
It.second.asTextEdits(); It.second.asTextEdits();
} }
// ApplyEdit will take care of calling Reply(). // ApplyEdit will take care of calling Reply().