[libcxx-commits] [libcxx] [libcxxabi] [libc++] Fix failures with GCC 14 (PR #92663)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 18 10:53:50 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 1b58940c88edaad9320bd21eaa7da65f7e791552 05dd888dfdc1f623acc9fe8df4fa7f4a02913191 -- libcxx/include/__string/constexpr_c_functions.h libcxx/include/__type_traits/remove_pointer.h libcxx/include/bitset libcxx/test/std/time/time.zone/time.zone.leap/nonmembers/comparison.pass.cpp libcxx/test/std/utilities/expected/expected.expected/monadic/transform.pass.cpp libcxx/test/std/utilities/expected/expected.expected/monadic/transform_error.pass.cpp libcxx/test/std/utilities/expected/expected.void/monadic/transform_error.pass.cpp libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp libcxxabi/src/cxa_personality.cpp libcxxabi/test/catch_const_pointer_nullptr.pass.cpp libcxxabi/test/catch_member_function_pointer_02.pass.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h
index 666b039e1e..1048f67055 100644
--- a/libcxx/include/__type_traits/remove_pointer.h
+++ b/libcxx/include/__type_traits/remove_pointer.h
@@ -23,13 +23,13 @@ struct remove_pointer {
   using type _LIBCPP_NODEBUG = __remove_pointer(_Tp);
 };
 
-#ifdef _LIBCPP_COMPILER_GCC
+#  ifdef _LIBCPP_COMPILER_GCC
 template <class _Tp>
 using __remove_pointer_t = typename remove_pointer<_Tp>::type;
-#else
+#  else
 template <class _Tp>
 using __remove_pointer_t = __remove_pointer(_Tp);
-#endif
+#  endif
 #else
 // clang-format off
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer                      {typedef _LIBCPP_NODEBUG _Tp type;};
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index c714c99588..9d4bdfe38d 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -1165,10 +1165,7 @@ __gxx_personality_v0(_Unwind_State state,
 }
 #endif
 
-_LIBCXXABI_FUNC_VIS void
-__cxa_call_terminate(void*) throw() {
-    std::terminate();
-}
+_LIBCXXABI_FUNC_VIS void __cxa_call_terminate(void*) throw() { std::terminate(); }
 
 __attribute__((noreturn))
 _LIBCXXABI_FUNC_VIS void

``````````

</details>


https://github.com/llvm/llvm-project/pull/92663


More information about the libcxx-commits mailing list