[libc-commits] [libc] [libc][stdfix] Fix buildbot failure because of a typo. (PR #126291)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Fri Feb 7 12:22:18 PST 2025
================
@@ -187,12 +187,11 @@ countls(T f) {
constexpr int CONTAIN_LEN = cpp::numeric_limits<BitType>::digits;
constexpr int PADDING_LEN = CONTAIN_LEN - FXRep::TOTAL_LEN;
- if constexpr (FXRep::SIGN_LEN != 0) {
- if (x < 0)
- x = bit_not(x);
- }
+ if constexpr (FXRep::SIGN_LEN != 0)
+ if (f < 0)
+ f = bit_not(f);
- BitType value_bits = FXBits(x)::get_bits();
+ BitType value_bits = FXBits(f)::get_bits();
----------------
nickdesaulniers wrote:
Still failing on the buildbots:
```
libc/src/__support/fixed_point/fx_bits.h:194:11: error: no viable conversion from 'FXBits' (aka 'FXBits<unsigned long _Fract>') to 'BitType' (aka 'unsigned int')
194 | BitType value_bits = FXBits(f)::get_bits();
| ^ ~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian/libc-x86_64-debian-dbg-bootstrap-build/llvm-project/libc/src/stdfix/countlsulr.cpp:17:23: note: in instantiation of function template specialization '__llvm_libc_20_0_0_git::fixed_point::countls<unsigned long _Fract>' requested here
17 | return fixed_point::countls(f);
| ^
```
https://github.com/llvm/llvm-project/pull/126291
More information about the libc-commits
mailing list