This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Add the KeepEmptyLinesAtEOF option
ClosedPublic

Authored by owenpan on Jun 6 2023, 1:32 PM.

Details

Summary

Adds an option KeepEmptyLinesAtEOF to keep empty lines (up to MaxEmptyLinesToKeep) before EOF. This remedies the probably unintentional change in behavior introduced in rG3d3ea8, which started to always remove empty lines before EOF.

Fixes https://github.com/llvm/llvm-project/issues/56054 and https://github.com/llvm/llvm-project/issues/63150.

Diff Detail

Event Timeline

owenpan created this revision.Jun 6 2023, 1:32 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptJun 6 2023, 1:32 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
owenpan requested review of this revision.Jun 6 2023, 1:32 PM
owenpan edited the summary of this revision. (Show Details)Jun 6 2023, 1:50 PM
This revision is now accepted and ready to land.Jun 7 2023, 2:24 AM
This revision was automatically updated to reflect the committed changes.