Skip to content

Commit

Permalink
[clangd] Oops, switchSourceHeader still needs to return a URI.
Browse files Browse the repository at this point in the history
Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61630

llvm-svn: 360121
  • Loading branch information
sam-mccall authored and MrSidims committed May 24, 2019
1 parent ef07565 commit 4a7e3fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clang-tools-extra/clangd/ClangdLSPServer.cpp
Expand Up @@ -825,9 +825,9 @@ void ClangdLSPServer::onGoToDeclaration(

void ClangdLSPServer::onSwitchSourceHeader(
const TextDocumentIdentifier &Params,
Callback<llvm::Optional<std::string>> Reply) {
Callback<llvm::Optional<URIForFile>> Reply) {
if (auto Result = Server->switchSourceHeader(Params.uri.file()))
Reply(URI::resolvePath(*Result, Params.uri.file()));
Reply(URIForFile::canonicalize(*Result, Params.uri.file()));
else
Reply(llvm::None);
}
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/ClangdLSPServer.h
Expand Up @@ -85,7 +85,7 @@ class ClangdLSPServer : private DiagnosticsConsumer {
Callback<std::vector<Location>>);
void onReference(const ReferenceParams &, Callback<std::vector<Location>>);
void onSwitchSourceHeader(const TextDocumentIdentifier &,
Callback<llvm::Optional<std::string>>);
Callback<llvm::Optional<URIForFile>>);
void onDocumentHighlight(const TextDocumentPositionParams &,
Callback<std::vector<DocumentHighlight>>);
void onFileEvent(const DidChangeWatchedFilesParams &);
Expand Down

0 comments on commit 4a7e3fc

Please sign in to comment.