================
@@ -480,9 +480,9 @@ def extract_lines(patch_file, whole_file):
line_count = 1
if match.group(3):
line_count = int(match.group(3))
+ # A hunk that adds no lines is a pure deletion, and start_line
+ # refers to the preceding line, which the deletion left alone.
if line_count == 0:
- line_count = 1
- if start_line == 0:
----------------
HazardyKnusperkeks wrote:
And `start_line == 0` can't happen anyway, or is it a possible real use case
which should format something?
https://github.com/llvm/llvm-project/pull/215946
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits