Index: clangd/ClangdServer.cpp =================================================================== --- clangd/ClangdServer.cpp +++ clangd/ClangdServer.cpp @@ -298,9 +298,8 @@ void ClangdServer::findDefinitions(PathRef File, Position Pos, Callback> CB) { - auto FS = FSProvider.getFileSystem(); - auto Action = [Pos, FS, this](Callback> CB, - llvm::Expected InpAST) { + auto Action = [Pos, this](Callback> CB, + llvm::Expected InpAST) { if (!InpAST) return CB(InpAST.takeError()); CB(clangd::findDefinitions(InpAST->AST, Pos, this->FileIdx.get())); @@ -391,10 +390,8 @@ void ClangdServer::findDocumentHighlights( PathRef File, Position Pos, Callback> CB) { - - auto FS = FSProvider.getFileSystem(); - auto Action = [FS, Pos](Callback> CB, - llvm::Expected InpAST) { + auto Action = [Pos](Callback> CB, + llvm::Expected InpAST) { if (!InpAST) return CB(InpAST.takeError()); CB(clangd::findDocumentHighlights(InpAST->AST, Pos)); @@ -405,9 +402,8 @@ void ClangdServer::findHover(PathRef File, Position Pos, Callback> CB) { - auto FS = FSProvider.getFileSystem(); - auto Action = [Pos, FS](Callback> CB, - llvm::Expected InpAST) { + auto Action = [Pos](Callback> CB, + llvm::Expected InpAST) { if (!InpAST) return CB(InpAST.takeError()); CB(clangd::getHover(InpAST->AST, Pos));