[libcxx-commits] [PATCH] D113597: [libcxx] Change the type of __size to match __width

Brian Cain via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 10 11:08:09 PST 2021


androm3da created this revision.
androm3da added reviewers: Mordante, ldionne.
androm3da requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.

In D103433 <https://reviews.llvm.org/D103433>, __size was declared as unsigned which will not find a std::min() overload corresponding with __width on some targets.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113597

Files:
  libcxx/include/__format/formatter_integral.h


Index: libcxx/include/__format/formatter_integral.h
===================================================================
--- libcxx/include/__format/formatter_integral.h
+++ libcxx/include/__format/formatter_integral.h
@@ -404,7 +404,7 @@
       __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it));
       this->__alignment = _Flags::_Alignment::__right;
       this->__fill = _CharT('0');
-      unsigned __size = __first - __begin;
+      uint32_t __size = __first - __begin;
       this->__width -= _VSTD::min(__size, this->__width);
     }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113597.386254.patch
Type: text/x-patch
Size: 557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211110/f4ad5244/attachment-0001.bin>


More information about the libcxx-commits mailing list