diff options
Diffstat (limited to 'clang-tools-extra/clangd/ClangdLSPServer.cpp')
-rw-r--r-- | clang-tools-extra/clangd/ClangdLSPServer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 9e24878dc8f..4fe81581807 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -1152,7 +1152,13 @@ void ClangdLSPServer::onChangeConfiguration( void ClangdLSPServer::onReference(const ReferenceParams &Params, Callback<std::vector<Location>> Reply) { Server->findReferences(Params.textDocument.uri.file(), Params.position, - CCOpts.Limit, std::move(Reply)); + CCOpts.Limit, + [Reply = std::move(Reply)]( + llvm::Expected<ReferencesResult> Refs) mutable { + if (!Refs) + return Reply(Refs.takeError()); + return Reply(std::move(Refs->References)); + }); } void ClangdLSPServer::onSymbolInfo(const TextDocumentPositionParams &Params, |