[libc-commits] [libc] [libc][test] Remove unused nan variables (PR #155894)

via libc-commits libc-commits at lists.llvm.org
Thu Aug 28 10:52:09 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Jordan Rupprecht (rupprecht)

<details>
<summary>Changes</summary>

These are redefined/shadowed by the `if constexpr (FPBits::FRACTION_LEN - 1 >= 5)` case below.

Added by #<!-- -->155569

---
Full diff: https://github.com/llvm/llvm-project/pull/155894.diff


1 Files Affected:

- (modified) libc/test/src/math/smoke/TotalOrderTest.h (-6) 


``````````diff
diff --git a/libc/test/src/math/smoke/TotalOrderTest.h b/libc/test/src/math/smoke/TotalOrderTest.h
index febed0157a6b2..50aac202f2028 100644
--- a/libc/test/src/math/smoke/TotalOrderTest.h
+++ b/libc/test/src/math/smoke/TotalOrderTest.h
@@ -104,12 +104,6 @@ class TotalOrderTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
   }
 
   void testNaNPayloads(TotalOrderFunc func) {
-
-    T qnan_0x15 = FPBits::quiet_nan(Sign::POS, 0x15).get_val();
-    T neg_qnan_0x15 = FPBits::quiet_nan(Sign::NEG, 0x15).get_val();
-    T snan_0x15 = FPBits::signaling_nan(Sign::POS, 0x15).get_val();
-    T neg_snan_0x15 = FPBits::signaling_nan(Sign::NEG, 0x15).get_val();
-
     EXPECT_TRUE(funcWrapper(func, aNaN, aNaN));
     EXPECT_TRUE(funcWrapper(func, sNaN, sNaN));
 

``````````

</details>


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


More information about the libc-commits mailing list