[all-commits] [llvm/llvm-project] 505639: [clang-format-diff] Correctly parse start-of-file ...

Tamir Duberstein via All-commits all-commits at lists.llvm.org
Mon Feb 27 12:03:55 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50563944ab962b58a1e00763ce16d8c712965c6d
      https://github.com/llvm/llvm-project/commit/50563944ab962b58a1e00763ce16d8c712965c6d
  Author: Tamir Duberstein <tamird at google.com>
  Date:   2023-02-27 (Mon, 27 Feb 2023)

  Changed paths:
    M clang/tools/clang-format/clang-format-diff.py

  Log Message:
  -----------
  [clang-format-diff] Correctly parse start-of-file diffs

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.

Submitting on behalf of @tamird.

Differential Revision: https://reviews.llvm.org/D144291




More information about the All-commits mailing list