[libc-commits] [libc] [Libc] Turn implicit to explicit conversion (PR #130615)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Mar 10 07:34:49 PDT 2025
================
@@ -401,7 +401,7 @@ class HighPrecisionDecimal {
this->right_shift(MAX_SHIFT_AMOUNT);
shift_amount += MAX_SHIFT_AMOUNT;
}
- this->right_shift(-shift_amount);
+ this->right_shift(-static_cast<uint32_t>(shift_amount));
----------------
jhuber6 wrote:
```suggestion
this->right_shift(static_cast<uint32_t>(-shift_amount));
```
I believe the intention of this code is to invert this value (Which is `< 0`).
https://github.com/llvm/llvm-project/pull/130615
More information about the libc-commits
mailing list