[libc-commits] [libc] [libc] Remove unnecessary `FPBits` functions and properties (PR #79113)

via libc-commits libc-commits at lists.llvm.org
Tue Jan 23 02:06:20 PST 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 376f3be83444901fc4d50570bee492f0f666938f 5f5ca7d8598a9409ab1ab5c18cd7a4549246a674 -- libc/fuzzing/stdlib/strtofloat_fuzz.cpp libc/src/__support/FPUtil/DivisionAndRemainderOperations.h libc/src/__support/FPUtil/FPBits.h libc/src/__support/FPUtil/Hypot.h libc/src/__support/FPUtil/ManipulationFunctions.h libc/src/__support/FPUtil/NormalFloat.h libc/src/__support/FPUtil/dyadic_float.h libc/src/__support/FPUtil/except_value_utils.h libc/src/__support/FPUtil/generic/FMA.h libc/src/__support/FPUtil/generic/FMod.h libc/src/__support/FPUtil/generic/sqrt.h libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h libc/src/__support/common.h libc/src/__support/str_to_float.h libc/src/math/generic/acosf.cpp libc/src/math/generic/acoshf.cpp libc/src/math/generic/asinf.cpp libc/src/math/generic/atanhf.cpp libc/src/math/generic/cosf.cpp libc/src/math/generic/coshf.cpp libc/src/math/generic/exp.cpp libc/src/math/generic/exp10.cpp libc/src/math/generic/exp10f_impl.h libc/src/math/generic/exp2.cpp libc/src/math/generic/exp2f_impl.h libc/src/math/generic/expf.cpp libc/src/math/generic/expm1.cpp libc/src/math/generic/expm1f.cpp libc/src/math/generic/log.cpp libc/src/math/generic/log10.cpp libc/src/math/generic/log10f.cpp libc/src/math/generic/log1p.cpp libc/src/math/generic/log1pf.cpp libc/src/math/generic/log2.cpp libc/src/math/generic/log2f.cpp libc/src/math/generic/logf.cpp libc/src/math/generic/powf.cpp libc/src/math/generic/sincosf.cpp libc/src/math/generic/sinf.cpp libc/src/math/generic/sinhf.cpp libc/src/math/generic/tanf.cpp libc/test/UnitTest/FPMatcher.h libc/test/src/__support/FPUtil/fpbits_test.cpp libc/test/src/math/FDimTest.h libc/test/src/math/FmaTest.h libc/test/src/math/HypotTest.h libc/test/src/math/ILogbTest.h libc/test/src/math/LdExpTest.h libc/test/src/math/NextAfterTest.h libc/test/src/math/RIntTest.h libc/test/src/math/RemQuoTest.h libc/test/src/math/RoundToIntegerTest.h libc/test/src/math/differential_testing/BinaryOpSingleOutputDiff.h libc/test/src/math/differential_testing/SingleInputSingleOutputDiff.h libc/test/src/math/smoke/FDimTest.h libc/test/src/math/smoke/FmaTest.h libc/test/src/math/smoke/HypotTest.h libc/test/src/math/smoke/ILogbTest.h libc/test/src/math/smoke/LdExpTest.h libc/test/src/math/smoke/NextAfterTest.h libc/test/src/math/smoke/NextTowardTest.h libc/test/src/math/smoke/RIntTest.h libc/test/src/math/smoke/RemQuoTest.h libc/test/src/math/smoke/RoundToIntegerTest.h libc/test/src/stdio/sprintf_test.cpp libc/test/src/stdio/sscanf_test.cpp libc/utils/MPFRWrapper/MPFRUtils.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/test/src/math/smoke/NextTowardTest.h b/libc/test/src/math/smoke/NextTowardTest.h
index 0641c78ec3..d65cc5d84d 100644
--- a/libc/test/src/math/smoke/NextTowardTest.h
+++ b/libc/test/src/math/smoke/NextTowardTest.h
@@ -46,8 +46,10 @@ class NextTowardTestTemplate : public LIBC_NAMESPACE::testing::Test {
   const long double to_neg_zero = ToFPBits::zero(Sign::NEG).get_val();
   const long double to_nan = ToFPBits::build_quiet_nan(Sign::POS, 1).get_val();
 
-  static constexpr StorageType min_subnormal = FPBits::min_subnormal().uintval();
-  static constexpr StorageType max_subnormal = FPBits::max_subnormal().uintval();
+  static constexpr StorageType min_subnormal =
+      FPBits::min_subnormal().uintval();
+  static constexpr StorageType max_subnormal =
+      FPBits::max_subnormal().uintval();
   static constexpr StorageType min_normal = FPBits::min_normal().uintval();
   static constexpr StorageType max_normal = FPBits::max_normal().uintval();
 

``````````

</details>


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


More information about the libc-commits mailing list