[libc-commits] [PATCH] D155899: [libc] Fix line reporting in assertion failure

Jon Chesterfield via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jul 20 15:34:26 PDT 2023


JonChesterfield added a comment.

IntegerToString returns a string view carefully sized to display only the digits from the number. Before this patch, we pass the whole line_str buffer. This prints as the empty string for integers that don't fill the buffer.

It's statically known that the value will fit in the buffer but the existing interface returns an optional. I haven't found an existing equivalent that returns a string view for statically sufficient buffer size, might be worth writing one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155899



More information about the libc-commits mailing list