[libc-commits] [libc] [libc] Float128 Emulation in LLVM libc (PR #200565)

via libc-commits libc-commits at lists.llvm.org
Thu Jun 4 09:22:17 PDT 2026


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 origin/main HEAD --extensions h,cpp -- libc/src/__support/FPUtil/float128.h libc/test/src/math/smoke/float128_test.cpp libc/src/__support/CPP/type_traits/is_floating_point.h libc/src/__support/FPUtil/FPBits.h libc/src/__support/FPUtil/bfloat16.h libc/src/__support/FPUtil/cast.h libc/src/__support/FPUtil/dyadic_float.h libc/src/__support/macros/properties/types.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/libc/src/__support/FPUtil/bfloat16.h b/libc/src/__support/FPUtil/bfloat16.h
index cf3fefe75..3edb36e53 100644
--- a/libc/src/__support/FPUtil/bfloat16.h
+++ b/libc/src/__support/FPUtil/bfloat16.h
@@ -135,11 +135,9 @@ struct BFloat16 {
 } // namespace fputil
 } // namespace LIBC_NAMESPACE_DECL
 
-static_assert(
-    LIBC_NAMESPACE::cpp::is_trivially_constructible<
-        LIBC_NAMESPACE::fputil::BFloat16>::value);
-static_assert(
-    LIBC_NAMESPACE::cpp::is_trivially_copyable<
-        LIBC_NAMESPACE::fputil::BFloat16>::value);
+static_assert(LIBC_NAMESPACE::cpp::is_trivially_constructible<
+              LIBC_NAMESPACE::fputil::BFloat16>::value);
+static_assert(LIBC_NAMESPACE::cpp::is_trivially_copyable<
+              LIBC_NAMESPACE::fputil::BFloat16>::value);
 
 #endif // LLVM_LIBC_SRC___SUPPORT_FPUTIL_BFLOAT16_H
diff --git a/libc/src/__support/FPUtil/float128.h b/libc/src/__support/FPUtil/float128.h
index 184cc802d..5cd01b179 100644
--- a/libc/src/__support/FPUtil/float128.h
+++ b/libc/src/__support/FPUtil/float128.h
@@ -66,11 +66,9 @@ struct Float128 {
 } // namespace fputil
 } // namespace LIBC_NAMESPACE_DECL
 
-static_assert(
-    LIBC_NAMESPACE::cpp::is_trivially_constructible<
-        LIBC_NAMESPACE::fputil::Float128>::value);
-static_assert(
-    LIBC_NAMESPACE::cpp::is_trivially_copyable<
-        LIBC_NAMESPACE::fputil::Float128>::value);
+static_assert(LIBC_NAMESPACE::cpp::is_trivially_constructible<
+              LIBC_NAMESPACE::fputil::Float128>::value);
+static_assert(LIBC_NAMESPACE::cpp::is_trivially_copyable<
+              LIBC_NAMESPACE::fputil::Float128>::value);
 
 #endif // LLVM_LIBC_SRC___SUPPORT_FPUTIL_FLOAT128_H

``````````

</details>


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


More information about the libc-commits mailing list