[libc-commits] [libc] [libc][NFC] Remove `FPBits` cast operator (PR #79142)

via libc-commits libc-commits at lists.llvm.org
Tue Jan 23 08:19:25 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 dffa8039b10823f67347453a0ef445ee785ed4aa 9b9fabaf649755129ba96a2a64fbe211c2cc60a0 -- libc/src/__support/FPUtil/BasicOperations.h 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/NearestIntegerOperations.h libc/src/__support/FPUtil/NormalFloat.h libc/src/__support/FPUtil/generic/FMA.h libc/src/__support/str_to_float.h libc/src/math/generic/exp.cpp libc/src/math/generic/exp10.cpp libc/src/math/generic/exp2.cpp libc/src/math/generic/expf.cpp libc/src/math/generic/hypotf.cpp libc/src/math/generic/log10f.cpp libc/src/math/generic/log1pf.cpp libc/src/math/generic/log2f.cpp libc/src/math/generic/logf.cpp libc/src/math/generic/range_reduction_fma.h libc/src/stdio/printf_core/float_dec_converter.h libc/test/UnitTest/FPMatcher.h libc/test/src/math/CeilTest.h libc/test/src/math/CopySignTest.h libc/test/src/math/FAbsTest.h libc/test/src/math/FDimTest.h libc/test/src/math/FMaxTest.h libc/test/src/math/FMinTest.h libc/test/src/math/FloorTest.h libc/test/src/math/FmaTest.h libc/test/src/math/FrexpTest.h libc/test/src/math/HypotTest.h libc/test/src/math/ILogbTest.h libc/test/src/math/LdExpTest.h libc/test/src/math/LogbTest.h libc/test/src/math/ModfTest.h libc/test/src/math/NextAfterTest.h libc/test/src/math/RIntTest.h libc/test/src/math/RemQuoTest.h libc/test/src/math/RoundTest.h libc/test/src/math/RoundToIntegerTest.h libc/test/src/math/SqrtTest.h libc/test/src/math/TruncTest.h libc/test/src/math/acosf_test.cpp libc/test/src/math/acoshf_test.cpp libc/test/src/math/asinf_test.cpp libc/test/src/math/asinhf_test.cpp libc/test/src/math/atanf_test.cpp libc/test/src/math/atanhf_test.cpp libc/test/src/math/cos_test.cpp libc/test/src/math/cosf_test.cpp libc/test/src/math/coshf_test.cpp libc/test/src/math/erff_test.cpp libc/test/src/math/exhaustive/exhaustive_test.h libc/test/src/math/exhaustive/hypotf_test.cpp libc/test/src/math/exhaustive/sincosf_test.cpp libc/test/src/math/exp10_test.cpp libc/test/src/math/exp10f_test.cpp libc/test/src/math/exp2_test.cpp libc/test/src/math/exp2f_test.cpp libc/test/src/math/exp_test.cpp libc/test/src/math/expf_test.cpp libc/test/src/math/expm1_test.cpp libc/test/src/math/expm1f_test.cpp libc/test/src/math/log10_test.cpp libc/test/src/math/log10f_test.cpp libc/test/src/math/log1p_test.cpp libc/test/src/math/log1pf_test.cpp libc/test/src/math/log2_test.cpp libc/test/src/math/log2f_test.cpp libc/test/src/math/log_test.cpp libc/test/src/math/logf_test.cpp libc/test/src/math/sin_test.cpp libc/test/src/math/sincosf_test.cpp libc/test/src/math/sinf_test.cpp libc/test/src/math/sinhf_test.cpp libc/test/src/math/smoke/FDimTest.h libc/test/src/math/smoke/FMaxTest.h libc/test/src/math/smoke/FMinTest.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/LogbTest.h libc/test/src/math/smoke/ModfTest.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/math/smoke/coshf_test.cpp libc/test/src/math/smoke/exp10f_test.cpp libc/test/src/math/smoke/exp2f_test.cpp libc/test/src/math/smoke/expf_test.cpp libc/test/src/math/smoke/expm1f_test.cpp libc/test/src/math/smoke/sinhf_test.cpp libc/test/src/math/tan_test.cpp libc/test/src/math/tanf_test.cpp libc/test/src/math/tanhf_test.cpp libc/test/src/stdlib/atof_test.cpp libc/test/src/stdlib/strtod_test.cpp libc/test/src/stdlib/strtof_test.cpp libc/utils/MPFRWrapper/MPFRUtils.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/test/UnitTest/FPMatcher.h b/libc/test/UnitTest/FPMatcher.h
index 3cdaffcfdc..69da5387d3 100644
--- a/libc/test/UnitTest/FPMatcher.h
+++ b/libc/test/UnitTest/FPMatcher.h
@@ -97,7 +97,7 @@ template <typename T> struct FPTest : public Test {
       LIBC_NAMESPACE::cpp::numeric_limits<StorageType>::max();                 \
   const T zero = FPBits::zero(Sign::POS).get_val();                            \
   const T neg_zero = FPBits::zero(Sign::NEG).get_val();                        \
-  const T aNaN = FPBits::build_quiet_nan().get_val();              \
+  const T aNaN = FPBits::build_quiet_nan().get_val();                          \
   const T sNaN = FPBits::build_nan(Sign::POS, 1).get_val();                    \
   const T inf = FPBits::inf(Sign::POS).get_val();                              \
   const T neg_inf = FPBits::inf(Sign::NEG).get_val();                          \

``````````

</details>


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


More information about the libc-commits mailing list