forked from OSchip/llvm-project
[clangd] Oops, switchSourceHeader still needs to return a URI.
Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61630 llvm-svn: 360121
This commit is contained in:
parent
bcaee49d00
commit
b9ec3e9370
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ private:
|
|||
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 &);
|
||||
|
|
Loading…
Reference in New Issue