[clang-tools-extra] r334018 - [clangd] Remove unused variables
Marc-Andre Laperle via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 5 07:07:45 PDT 2018
Author: malaperle
Date: Tue Jun 5 07:07:45 2018
New Revision: 334018
URL: http://llvm.org/viewvc/llvm-project?rev=334018&view=rev
Log:
[clangd] Remove unused variables
Summary: Signed-off-by: Marc-Andre Laperle <marc-andre.laperle at ericsson.com>
Subscribers: klimek, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D47737
Modified:
clang-tools-extra/trunk/clangd/ClangdServer.cpp
Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdServer.cpp?rev=334018&r1=334017&r2=334018&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdServer.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdServer.cpp Tue Jun 5 07:07:45 2018
@@ -298,9 +298,8 @@ void ClangdServer::dumpAST(PathRef File,
void ClangdServer::findDefinitions(PathRef File, Position Pos,
Callback<std::vector<Location>> CB) {
- auto FS = FSProvider.getFileSystem();
- auto Action = [Pos, FS, this](Callback<std::vector<Location>> CB,
- llvm::Expected<InputsAndAST> InpAST) {
+ auto Action = [Pos, this](Callback<std::vector<Location>> CB,
+ llvm::Expected<InputsAndAST> InpAST) {
if (!InpAST)
return CB(InpAST.takeError());
CB(clangd::findDefinitions(InpAST->AST, Pos, this->FileIdx.get()));
@@ -391,10 +390,8 @@ ClangdServer::formatCode(llvm::StringRef
void ClangdServer::findDocumentHighlights(
PathRef File, Position Pos, Callback<std::vector<DocumentHighlight>> CB) {
-
- auto FS = FSProvider.getFileSystem();
- auto Action = [FS, Pos](Callback<std::vector<DocumentHighlight>> CB,
- llvm::Expected<InputsAndAST> InpAST) {
+ auto Action = [Pos](Callback<std::vector<DocumentHighlight>> CB,
+ llvm::Expected<InputsAndAST> InpAST) {
if (!InpAST)
return CB(InpAST.takeError());
CB(clangd::findDocumentHighlights(InpAST->AST, Pos));
@@ -405,9 +402,8 @@ void ClangdServer::findDocumentHighlight
void ClangdServer::findHover(PathRef File, Position Pos,
Callback<llvm::Optional<Hover>> CB) {
- auto FS = FSProvider.getFileSystem();
- auto Action = [Pos, FS](Callback<llvm::Optional<Hover>> CB,
- llvm::Expected<InputsAndAST> InpAST) {
+ auto Action = [Pos](Callback<llvm::Optional<Hover>> CB,
+ llvm::Expected<InputsAndAST> InpAST) {
if (!InpAST)
return CB(InpAST.takeError());
CB(clangd::getHover(InpAST->AST, Pos));
More information about the cfe-commits
mailing list