[libc-commits] [libc] [libc][math] Fix -Wshadow warnings in FMod.h (PR #196346)

via libc-commits libc-commits at lists.llvm.org
Thu May 7 08:15:27 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Nico Weber (nico)

<details>
<summary>Changes</summary>

The using statement inside the lambda is redundant with the same using 4 lines up.

No behavior change.

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


1 Files Affected:

- (modified) libc/src/__support/FPUtil/generic/FMod.h (-1) 


``````````diff
diff --git a/libc/src/__support/FPUtil/generic/FMod.h b/libc/src/__support/FPUtil/generic/FMod.h
index b74b8b7d1b18d..1a321231a8eb9 100644
--- a/libc/src/__support/FPUtil/generic/FMod.h
+++ b/libc/src/__support/FPUtil/generic/FMod.h
@@ -171,7 +171,6 @@ class FMod {
   using StorageType = typename FPB::StorageType;
 
   LIBC_INLINE static constexpr bool pre_check(T x, T y, T &out) {
-    using FPB = fputil::FPBits<T>;
     const T quiet_nan = FPB::quiet_nan().get_val();
     FPB sx(x), sy(y);
     if (LIBC_LIKELY(!sy.is_zero() && !sy.is_inf_or_nan() &&

``````````

</details>


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


More information about the libc-commits mailing list