diff options
| -rw-r--r-- | clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp index 5dbfca5f246..db05c70aa73 100644 --- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp +++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp @@ -769,12 +769,14 @@ TEST_F(TUSchedulerTests, CommandLineWarnings) { // We should not see warnings from command-line parsing. CDB.ExtraClangFlags = {"-Wsome-unknown-warning"}; + // (!) 'Ready' must live longer than TUScheduler. + Notification Ready; + TUScheduler S(CDB, /*AsyncThreadsCount=*/getDefaultAsyncThreadsCount(), /*StorePreambleInMemory=*/true, /*ASTCallbacks=*/captureDiags(), /*UpdateDebounce=*/std::chrono::steady_clock::duration::zero(), ASTRetentionPolicy()); - Notification Ready; std::vector<Diag> Diagnostics; updateWithDiags(S, testPath("foo.cpp"), "void test() {}", WantDiagnostics::Yes, [&](std::vector<Diag> D) { |

