This is an archive of the discontinued LLVM Phabricator instance.

[clang-format-diff] Correctly parse start-of-file diffs
ClosedPublic

Authored by tamird on Feb 17 2023, 12:31 PM.

Details

Summary

Handle the case where the diff is a pure removal of lines. Before this
change start_line would end up as 0 which is rejected by clang-format.

Diff Detail

Event Timeline

tamird created this revision.Feb 17 2023, 12:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 12:31 PM
tamird requested review of this revision.Feb 17 2023, 12:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 12:31 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
leonardchan accepted this revision.Feb 17 2023, 12:54 PM
This revision is now accepted and ready to land.Feb 17 2023, 12:54 PM
This revision was automatically updated to reflect the committed changes.