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

via libc-commits libc-commits at lists.llvm.org
Thu Aug 28 14:28:26 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 https://github.com/llvm/llvm-project/pull/155569. I missed these ones in #<!-- -->155894.

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


1 Files Affected:

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


``````````diff
diff --git a/libc/test/src/math/smoke/TotalOrderMagTest.h b/libc/test/src/math/smoke/TotalOrderMagTest.h
index 32f3932cb3f6d..8a389df089328 100644
--- a/libc/test/src/math/smoke/TotalOrderMagTest.h
+++ b/libc/test/src/math/smoke/TotalOrderMagTest.h
@@ -106,12 +106,6 @@ class TotalOrderMagTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
   }
 
   void testNaNPayloads(TotalOrderMagFunc 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/155925


More information about the libc-commits mailing list