[libc-commits] [PATCH] D149594: [libc] Add explicit constructor calls to fix compilation when using UInt<T>

Mikhail Ramalho via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon May 1 11:43:28 PDT 2023


mikhail.ramalho added inline comments.


================
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
----------------
sivachandra wrote:
> Nit: We are slowly switching over to use `static_cast` over `bool(...)` which apparently is equivalent to C like casts.
tbh, I thought this was calling the bool constructor. I'll change it.


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