summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp')
-rw-r--r--clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
index 5e19d370d54..b605c940360 100644
--- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
@@ -83,14 +83,12 @@ protected:
WantDiagnostics WD,
llvm::unique_function<void(std::vector<Diag>)> CB) {
Path OrigFile = File.str();
- WithContextValue Ctx(
- DiagsCallbackKey,
- Bind(
- [OrigFile](decltype(CB) CB, PathRef File, std::vector<Diag> Diags) {
- assert(File == OrigFile);
- CB(std::move(Diags));
- },
- std::move(CB)));
+ WithContextValue Ctx(DiagsCallbackKey,
+ [OrigFile, CB = std::move(CB)](
+ PathRef File, std::vector<Diag> Diags) mutable {
+ assert(File == OrigFile);
+ CB(std::move(Diags));
+ });
S.update(File, std::move(Inputs), WD);
}
OpenPOWER on IntegriCloud