[libcxx-commits] [libcxx] [libc++][future] Applied `[[nodiscard]]` (PR #174924)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 8 01:07:43 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions ,cpp -- libcxx/include/future libcxx/test/libcxx/thread/nodiscard.verify.cpp libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp libcxx/test/std/thread/futures/futures.promise/set_value_void.pass.cpp libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp libcxx/test/std/thread/futures/futures.unique_future/get.pass.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp
index 54ce536d8..b226b1b6f 100644
--- a/libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.promise/set_exception.pass.cpp
@@ -30,8 +30,8 @@ int main(int, char**)
p.set_exception(std::make_exception_ptr(3));
try
{
- (void)f.get();
- assert(false);
+ (void)f.get();
+ assert(false);
}
catch (int i)
{
diff --git a/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
index bd56f5288..eb81c3c66 100644
--- a/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
@@ -36,8 +36,8 @@ int main(int, char**)
support::make_test_thread(func, std::move(p)).detach();
try
{
- (void)f.get();
- assert(false);
+ (void)f.get();
+ assert(false);
}
catch (int i)
{
diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp
index d9e53670a..3d40b418e 100644
--- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp
@@ -95,8 +95,8 @@ int main(int, char**)
support::make_test_thread(func1, std::move(p)).detach();
try
{
- (void)f.get();
- assert(false);
+ (void)f.get();
+ assert(false);
}
catch (const A& e)
{
diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp
index 287a68f71..d8dc2659b 100644
--- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp
@@ -95,8 +95,8 @@ int main(int, char**)
support::make_test_thread(func1, std::move(p)).detach();
try
{
- (void)f.get();
- assert(false);
+ (void)f.get();
+ assert(false);
}
catch (const A& e)
{
``````````
</details>
https://github.com/llvm/llvm-project/pull/174924
More information about the libcxx-commits
mailing list