[libc-commits] [PATCH] D118791: [libc][Obvious] Fix a mismatch signature of HighPrecisionDecimal::should_round_up.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Feb 2 07:21:17 PST 2022

lntue created this revision.
lntue added reviewers: michaelrj, sivachandra.
Herald added subscribers: ecnelises, tschuett.
Herald added a project: libc-project.
lntue requested review of this revision.

Its input should be int32_t instead of uint32_t.

  rG LLVM Github Monorepo



Index: libc/src/__support/high_precision_decimal.h
--- libc/src/__support/high_precision_decimal.h
+++ libc/src/__support/high_precision_decimal.h
@@ -111,7 +111,7 @@
   uint8_t digits[MAX_NUM_DIGITS];
-  bool should_round_up(uint32_t roundToDigit) {
+  bool should_round_up(int32_t roundToDigit) {
     if (roundToDigit < 0 || roundToDigit >= this->num_digits) {
       return false;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118791.405261.patch
Type: text/x-patch
Size: 472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220202/07be30b9/attachment.bin>

More information about the libc-commits mailing list