This is an archive of the discontinued LLVM Phabricator instance.

[clang-format][NFC] Clean up IndentForLevel in LevelIndentTracker
ClosedPublic

Authored by owenpan on Jul 4 2022, 10:07 PM.

Diff Detail

Event Timeline

owenpan created this revision.Jul 4 2022, 10:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2022, 10:07 PM
owenpan requested review of this revision.Jul 4 2022, 10:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2022, 10:07 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
clang/lib/Format/UnwrappedLineFormatter.cpp
82–83

Could we do this with with resize similar to my proposal in D129064?

owenpan updated this revision to Diff 442427.Jul 5 2022, 7:31 PM

Use resize() instead of insert().

owenpan added inline comments.Jul 5 2022, 7:32 PM
clang/lib/Format/UnwrappedLineFormatter.cpp
82–83

Good idea!

owenpan marked an inline comment as done.Jul 5 2022, 7:33 PM
This revision is now accepted and ready to land.Jul 6 2022, 12:57 PM
curdeius accepted this revision.Jul 7 2022, 1:36 AM