[libc-commits] [libc] [libc][math] Fix buildbot fails (PR #151186)
via libc-commits
libc-commits at lists.llvm.org
Tue Jul 29 10:00:47 PDT 2025
================
@@ -66,9 +66,8 @@ cast(InType x) {
cpp::max(OutFPBits::FRACTION_LEN, InFPBits::FRACTION_LEN);
DyadicFloat<cpp::bit_ceil(MAX_FRACTION_LEN)> xd(x);
return xd.template as<OutType, /*ShouldSignalExceptions=*/true>();
- }
-
- return static_cast<OutType>(x);
+ } else
+ return static_cast<OutType>(x);
----------------
overmighty wrote:
Nit:
> ```cpp
> // Use braces for the `else if` and `else` block to keep it uniform with the
> // `if` block.
> ```
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
```suggestion
} else {
return static_cast<OutType>(x);
}
```
https://github.com/llvm/llvm-project/pull/151186
More information about the libc-commits
mailing list