[libc-commits] [PATCH] D149594: [libc] Add explicit constructor calls to fix compilation when using UInt<T>
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon May 1 10:00:24 PDT 2023
sivachandra accepted this revision.
sivachandra added a subscriber: lntue.
sivachandra added a comment.
This revision is now accepted and ready to land.
OK from my side after addressing the nits but please wait for @lntue and @michaelrj also.
================
Comment at: libc/src/__support/FPUtil/generic/sqrt.h:139
// We compute one more iteration in order to round correctly.
- bool lsb = y & 1; // Least significant bit
+ bool lsb = bool(y & 1); // Least significant bit
bool rb = false; // Round bit
----------------
Nit: We are slowly switching over to use `static_cast` over `bool(...)` which apparently is equivalent to C like casts.
================
Comment at: libc/src/__support/float_to_string.h:206
+ wide_mant[0] = uint64_t(mantissa & (uint64_t(-1)));
+ wide_mant[1] = uint64_t(mantissa >> 64);
val = (val * wide_mant) >> shift_amount;
----------------
Same here and other places in this patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149594/new/
https://reviews.llvm.org/D149594
More information about the libc-commits
mailing list