[clangd] Fix using the incorrect Index for go-to-definition.

Reviewers: sammccall

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

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

llvm-svn: 334176
This commit is contained in:
Haojian Wu 2018-06-07 08:49:55 +00:00
parent f8c7637027
commit 6138b78672
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ void ClangdServer::findDefinitions(PathRef File, Position Pos,
llvm::Expected<InputsAndAST> InpAST) {
if (!InpAST)
return CB(InpAST.takeError());
CB(clangd::findDefinitions(InpAST->AST, Pos, this->FileIdx.get()));
CB(clangd::findDefinitions(InpAST->AST, Pos, Index));
};
WorkScheduler.runWithAST("Definitions", File, Bind(Action, std::move(CB)));