[libcxx-commits] [libcxx] [libc++][math] Provide overloads for cv-unqualified floating point types for `std::signbit` (PR #106566)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 29 08:16:03 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 56152fa377302fd8124e8be2a02dcb927a041f0a 7041ead4370ab4cc45dc14396eab19ef3ffc4fb8 --extensions cpp,h -- libcxx/test/std/numerics/c.math/signbit.pass.cpp libcxx/include/__math/traits.h libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-gcc.pass.cpp
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/__math/traits.h b/libcxx/include/__math/traits.h
index 41925b2045..e2a8dd52b5 100644
--- a/libcxx/include/__math/traits.h
+++ b/libcxx/include/__math/traits.h
@@ -43,9 +43,9 @@ _LIBCPP_NODISCARD inline
 #if __has_constexpr_builtin(__builtin_signbit)
     _LIBCPP_CONSTEXPR_SINCE_CXX23
 #endif
-_LIBCPP_HIDE_FROM_ABI
+    _LIBCPP_HIDE_FROM_ABI
 #ifdef _LIBCPP_PREFERRED_OVERLOAD
-_LIBCPP_PREFERRED_OVERLOAD
+    _LIBCPP_PREFERRED_OVERLOAD
 #endif
     bool
     signbit(float __x) _NOEXCEPT {
@@ -57,9 +57,9 @@ _LIBCPP_NODISCARD inline
 #if __has_constexpr_builtin(__builtin_signbit)
     _LIBCPP_CONSTEXPR_SINCE_CXX23
 #endif
-_LIBCPP_HIDE_FROM_ABI
+    _LIBCPP_HIDE_FROM_ABI
 #ifdef _LIBCPP_PREFERRED_OVERLOAD
-_LIBCPP_PREFERRED_OVERLOAD
+    _LIBCPP_PREFERRED_OVERLOAD
 #endif
     bool
     signbit(double __x) _NOEXCEPT {
@@ -71,9 +71,9 @@ _LIBCPP_NODISCARD inline
 #if __has_constexpr_builtin(__builtin_signbit)
     _LIBCPP_CONSTEXPR_SINCE_CXX23
 #endif
-_LIBCPP_HIDE_FROM_ABI
+    _LIBCPP_HIDE_FROM_ABI
 #ifdef _LIBCPP_PREFERRED_OVERLOAD
-_LIBCPP_PREFERRED_OVERLOAD
+    _LIBCPP_PREFERRED_OVERLOAD
 #endif
     bool
     signbit(long double __x) _NOEXCEPT {

``````````

</details>


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


More information about the libcxx-commits mailing list