diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -725,8 +725,8 @@ void ClangdLSPServer::onCommandApplyTweak(const TweakArgs &Args, Callback Reply) { - auto Action = [this, Reply = std::move(Reply), - File = Args.file](llvm::Expected R) mutable { + auto Action = [this, Reply = std::move(Reply)]( + llvm::Expected R) mutable { if (!R) return Reply(R.takeError()); diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -575,8 +575,7 @@ // Tracks number of times a tweak has been offered. static constexpr trace::Metric TweakAvailable( "tweak_available", trace::Metric::Counter, "tweak_id"); - auto Action = [File = File.str(), Sel, CB = std::move(CB), - Filter = std::move(Filter), + auto Action = [Sel, CB = std::move(CB), Filter = std::move(Filter), FeatureModules(this->FeatureModules)]( Expected InpAST) mutable { if (!InpAST) @@ -756,8 +755,7 @@ void ClangdServer::inlayHints(PathRef File, Callback> CB) { - auto Action = [File = File.str(), - CB = std::move(CB)](Expected InpAST) mutable { + auto Action = [CB = std::move(CB)](Expected InpAST) mutable { if (!InpAST) return CB(InpAST.takeError()); CB(clangd::inlayHints(InpAST->AST));