diff options
author | michaelrj-google <71531609+michaelrj-google@users.noreply.github.com> | 2023-10-04 13:00:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 13:00:48 -0700 |
commit | bfcfc2a6d43f9cd86d66e7e68c03f3200bb1e366 (patch) | |
tree | b9a0181b55e2c2cf07130796a7af1941fa730aa6 /clang/lib/Format/WhitespaceManager.cpp | |
parent | 7539bcf994ed741417bcf86af96c61ff86534177 (diff) | |
download | llvm-bfcfc2a6d43f9cd86d66e7e68c03f3200bb1e366.zip llvm-bfcfc2a6d43f9cd86d66e7e68c03f3200bb1e366.tar.gz llvm-bfcfc2a6d43f9cd86d66e7e68c03f3200bb1e366.tar.bz2 |
[libc] Fix typo in long double negative block (#68243)
The long double version of float to string's get_negative_block had a
bug in table mode. In table mode, one of the tables is named
"MIN_BLOCK_2" and it stores the number of blocks that are all zeroes
before the digits start for a given index. The check for long doubles
was incorrectly "block_index <= MIN_BLOCK_2[idx]" when it should be
"block_index < MIN_BLOCK_2[idx]" (without the equal sign). This bug
caused an off-by-one error for some long double values. This patch fixes
the bug and adds tests to ensure it doesn't regress.
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
0 files changed, 0 insertions, 0 deletions