[libcxx-commits] [libcxx] [libc++] Work around new GCC 15 type_traits builtins that can't be used as Clang's can (PR #137871)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 13 12:00:31 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/__type_traits/add_lvalue_reference.h libcxx/include/__type_traits/add_pointer.h libcxx/include/__type_traits/add_rvalue_reference.h libcxx/include/__type_traits/decay.h libcxx/include/__type_traits/remove_all_extents.h libcxx/include/__type_traits/remove_extent.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__type_traits/add_pointer.h b/libcxx/include/__type_traits/add_pointer.h
index f37f9cf5a..289d51adc 100644
--- a/libcxx/include/__type_traits/add_pointer.h
+++ b/libcxx/include/__type_traits/add_pointer.h
@@ -20,7 +20,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer) && !defined(_LIBCPP_COMPILER_GCC)
+#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer) && \
+ !defined(_LIBCPP_COMPILER_GCC)
template <class _Tp>
using __add_pointer_t _LIBCPP_NODEBUG = __add_pointer(_Tp);
``````````
</details>
https://github.com/llvm/llvm-project/pull/137871
More information about the libcxx-commits
mailing list