This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix SpacesInLineCommentPrefix deleting tokens.
ClosedPublic

Authored by curdeius on Feb 13 2022, 1:34 PM.

Diff Detail

Event Timeline

curdeius requested review of this revision.Feb 13 2022, 1:34 PM
curdeius created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2022, 1:34 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

I thought about using signed ints for Minimum and Maximum in the style, but then, we won't be able to use -1 for Maximum the same way as now and signed int makes no sense for Minimum...

clang/lib/Format/BreakableToken.cpp
799–800

Not strictly necessary, but without the cast we have a signed/unsigned mismatch warning on comparison.

Never would have thought about that.

This revision is now accepted and ready to land.Feb 13 2022, 11:46 PM
owenpan accepted this revision.Feb 14 2022, 12:39 AM