[libcxx-commits] [PATCH] D103444: [libcxx] Don't use an undefined '+' in unsigned/octal/hexal print formats

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 1 13:29:59 PDT 2021


mstorsjo added a comment.

In D103444#2790915 <https://reviews.llvm.org/D103444#2790915>, @Quuxplusone wrote:

> Looks reasonable to me. FWIW, a more invasive rewrite would put the letter-computing code //first://

Yup, that'd work too, and it seems like others prefer that version too, so I guess I can rewrite it that way.

In D103444#2791182 <https://reviews.llvm.org/D103444#2791182>, @Mordante wrote:

> SMGT, but I'd like some unit tests to test the new correct behaviour.

Hmm, so a test under libcxx/test/libcxx somewhere, with a local class subclassing `std::__1::__num_put_base` so that the protected method `__format_int` can be called, and then testing the different flag combinations?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103444/new/

https://reviews.llvm.org/D103444



More information about the libcxx-commits mailing list