[libcxx-commits] [libcxx] [libc++] Add warning groups to diagnose_if when available (PR #128759)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 23 05:53:01 PDT 2025
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 HEAD~1 HEAD --extensions ,h -- libcxx/include/__atomic/check_memory_order.h libcxx/include/__config libcxx/include/__filesystem/path.h libcxx/include/__hash_table libcxx/include/__tree
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__atomic/check_memory_order.h b/libcxx/include/__atomic/check_memory_order.h
index f7b589c1f..0263424f7 100644
--- a/libcxx/include/__atomic/check_memory_order.h
+++ b/libcxx/include/__atomic/check_memory_order.h
@@ -16,28 +16,28 @@
#endif
#define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \
- _LIBCPP_LEGACY_DIAGNOSE_IF( \
+ _LIBCPP_LEGACY_DIAGNOSE_IF( \
"atomic-memory-ordering", \
"warning", \
"memory order argument to atomic operation is invalid", \
__m == memory_order_consume || __m == memory_order_acquire || __m == memory_order_acq_rel)
#define _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) \
- _LIBCPP_LEGACY_DIAGNOSE_IF( \
+ _LIBCPP_LEGACY_DIAGNOSE_IF( \
"atomic-memory-ordering", \
"warning", \
"memory order argument to atomic operation is invalid", \
__m == memory_order_release || __m == memory_order_acq_rel)
#define _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__m, __f) \
- _LIBCPP_LEGACY_DIAGNOSE_IF( \
+ _LIBCPP_LEGACY_DIAGNOSE_IF( \
"atomic-memory-ordering", \
"warning", \
"memory order argument to atomic operation is invalid", \
__f == memory_order_release || __f == memory_order_acq_rel)
#define _LIBCPP_CHECK_WAIT_MEMORY_ORDER(__m) \
- _LIBCPP_LEGACY_DIAGNOSE_IF( \
+ _LIBCPP_LEGACY_DIAGNOSE_IF( \
"atomic-memory-ordering", \
"warning", \
"memory order argument to atomic operation is invalid", \
``````````
</details>
https://github.com/llvm/llvm-project/pull/128759
More information about the libcxx-commits
mailing list