This is an archive of the discontinued LLVM Phabricator instance.

Fix integer underflow bug when aligning code in clang-format
AbandonedPublic

Authored by sstwcw on Feb 12 2022, 4:00 AM.

Diff Detail

Event Timeline

sstwcw requested review of this revision.Feb 12 2022, 4:00 AM
sstwcw created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2022, 4:00 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

This isolates the problem that changes the unit test mentioned in https://reviews.llvm.org/D119599.

HazardyKnusperkeks edited reviewers, added: MyDeveloperDay, curdeius, owenpan; removed: Restricted Project.Feb 12 2022, 9:17 AM
HazardyKnusperkeks requested changes to this revision.Feb 12 2022, 9:19 AM
HazardyKnusperkeks added inline comments.
clang/lib/Format/WhitespaceManager.cpp
578

Could you elaborate the problem? Add a test/assert?

clang/unittests/Format/FormatTest.cpp
16854

I disagree. Limit 0 and Limit != 0 behaves differently and you should not remove the old test.

This revision now requires changes to proceed.Feb 12 2022, 9:19 AM
sstwcw abandoned this revision.Feb 13 2022, 2:20 PM
sstwcw added inline comments.
clang/unittests/Format/FormatTest.cpp
16854

I hadn't noticed Limit != 0 behaves differently. Now I understand I don't need to change this test. I am going to close this diff.