From 0905767610d656fdbe98094583b3d5f5be5f29da Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 26 Jun 2025 12:34:16 +0200 Subject: [PATCH] [libc++] Address remaining comments from #130145 I've accidentally merged the PR before addressing all comments. This patch fixes the remaining ones. --- .../thread/futures/futures.async/wait_on_destruct.pass.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libcxx/test/std/thread/futures/futures.async/wait_on_destruct.pass.cpp b/libcxx/test/std/thread/futures/futures.async/wait_on_destruct.pass.cpp index 984fcd316b59..8260ec3dfcaf 100644 --- a/libcxx/test/std/thread/futures/futures.async/wait_on_destruct.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.async/wait_on_destruct.pass.cpp @@ -15,13 +15,15 @@ // Make sure that the `future` destructor keeps the data alive until the thread finished. This test fails by triggering // TSan. It may not be observable by normal means. +// See https://github.com/llvm/llvm-project/pull/125433#issuecomment-2703618927 for more details. + #include #include #include std::mutex mux; -int main() { +int main(int, char**) { using namespace std::chrono_literals; std::unique_lock lock(mux); std::atomic in_async = false; @@ -34,4 +36,6 @@ int main() { }); in_async.wait(true); lock.unlock(); + + return 0; }