This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Fix `utohexstr` of zero with fixed width
Needs ReviewPublic

Authored by IllogicalMagic on Jul 16 2023, 11:42 PM.

Details

Reviewers
ychen
dblaikie
Summary

Fixed-width implementation of utohexstr contained a bug where extra zero was added when width argument is present and converted value is zero.

Add check for zero width in zero-handling path to fix the issue. Add unit tests for zero input.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2023, 11:42 PM
IllogicalMagic requested review of this revision.Jul 16 2023, 11:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2023, 11:42 PM