diff options
author | Zhihao Yuan <zy@miator.net> | 2019-06-10 17:11:46 +0000 |
---|---|---|
committer | Zhihao Yuan <zy@miator.net> | 2019-06-10 17:11:46 +0000 |
commit | 6bc4a7685ee4321a74ad987032e678c6273775ff (patch) | |
tree | cd8524adc5a7d3159e5cd9bc7fc97996bedc2e69 /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp | |
parent | 13d16b94c6b795d25bfddb8130f13d2284551303 (diff) | |
download | llvm-6bc4a7685ee4321a74ad987032e678c6273775ff.zip llvm-6bc4a7685ee4321a74ad987032e678c6273775ff.tar.gz llvm-6bc4a7685ee4321a74ad987032e678c6273775ff.tar.bz2 |
[libc++] Fix leading zeros in std::to_chars
Summary:
It is a bugfix proposal for https://bugs.llvm.org/show_bug.cgi?id=42166.
`std::to_chars` appends leading zeros if input 64-bit value has 9, 10 or 11 digits.
According to documentation `std::to_chars` must not append leading zeros:
https://en.cppreference.com/w/cpp/utility/to_chars
Changeset should not affect `std::to_chars` performance:
http://quick-bench.com/CEpRs14xxA9WLvkXFtaJ3TWOVAg
Unit test that `std::from_chars` supports compatibility for both `std::to_chars` outputs (previous and fixed one) already exists:
https://github.com/llvm-mirror/libcxx/blob/1f60111b597e5cb80a4513ec86f79b7e137f7793/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp#L63
Reviewers: lichray, mclow.lists, ldionne, EricWF
Reviewed By: lichray, mclow.lists
Subscribers: zoecarver, christof, dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D63047
llvm-svn: 362967
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions