[libcxx-commits] [libcxx] [libcxx] Implementation of P1831R1 (PR #101439)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 5 09:52:15 PDT 2024
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 cf79aba99db4909437b8977a59c51bc8899ddb9c 6e5b5cf982f0c1dde3e0fe6d2ae1e3e5c2072dda --extensions ,cpp,h -- libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.helper/volatile_tuple_element_deprecated_in_cxx20.verify.cpp libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.helper/volatile_tuple_size_deprecated_in_cxx20.verify.cpp libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/volatile_deprecated.verify.cpp libcxx/include/__atomic/atomic.h libcxx/include/__atomic/atomic_base.h libcxx/include/__config libcxx/include/__tuple/tuple_element.h libcxx/include/__tuple/tuple_size.h libcxx/include/atomic libcxx/include/tuple libcxx/include/variant
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 1da5bef953..2b597fd0a0 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -746,9 +746,11 @@ typedef __char32_t char32_t;
template <class _Tp, bool __cxx20 = _LIBCPP_STD_VER >= 20>
_LIBCPP_HIDE_FROM_ABI constexpr bool __volatile_deprecated_since_cxx20_warning = true;
template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI constexpr bool __volatile_deprecated_since_cxx20_warning<_Tp, true> = true;
+_LIBCPP_DEPRECATED_IN_CXX20
+_LIBCPP_HIDE_FROM_ABI constexpr bool __volatile_deprecated_since_cxx20_warning<_Tp, true> = true;
# define _LIBCPP_VOLATILE_DEPRECATED_WARNING static_assert(__volatile_deprecated_since_cxx20_warning<volatile _Tp>)
-# define _LIBCPP_CONST_VOLATILE_DEPRECATED_WARNING static_assert(__volatile_deprecated_since_cxx20_warning<const volatile _Tp>)
+# define _LIBCPP_CONST_VOLATILE_DEPRECATED_WARNING \
+ static_assert(__volatile_deprecated_since_cxx20_warning<const volatile _Tp>)
// Macros to enter and leave a state where deprecation warnings are suppressed.
# if defined(_LIBCPP_COMPILER_CLANG_BASED) || defined(_LIBCPP_COMPILER_GCC)
diff --git a/libcxx/include/variant b/libcxx/include/variant
index 21e7c84064..56aafa869f 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -340,7 +340,7 @@ template <size_t _Ip, class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const _Tp> : add_const<variant_alternative_t<_Ip, _Tp>> {};
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, volatile _Tp> : add_volatile<variant_alternative_t<_Ip, _Tp>> {
+struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, volatile _Tp> : add_volatile<variant_alternative_t<_Ip, _Tp>> {
_LIBCPP_VOLATILE_DEPRECATED_WARNING;
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/101439
More information about the libcxx-commits
mailing list