[libc-commits] [PATCH] D150906: [libc] Add a str() method to FPBits which returns a string representation.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu May 18 15:03:13 PDT 2023


lntue added inline comments.


================
Comment at: libc/test/src/__support/FPUtil/fpbits_test.cpp:124
+
+TEST(LlvmLibcFPBitsTest, LongDoubleType) {
+  if constexpr (sizeof(long double) == sizeof(double))
----------------
How about having 2 separate long double tests `X86LongDoubleType` and `QuadPrecisionLongDoubleType`?  You can have them return early by testing:
```
  if constexpr( fputil::FloatProperties<long double>::MANTISSA_WIDTH != ... )
    return;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150906/new/

https://reviews.llvm.org/D150906



More information about the libc-commits mailing list