[PATCH] D112056: [clang-format] git-clang-format throws an assertion when removing files as part of the commit
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 20 01:07:24 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5e969125c609: [clang-format] git-clang-format throws an assertion when removing files as part… (authored by MyDeveloperDay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112056/new/
https://reviews.llvm.org/D112056
Files:
clang/tools/clang-format/git-clang-format
Index: clang/tools/clang-format/git-clang-format
===================================================================
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -327,6 +327,8 @@
line_count = int(match.group(3))
if line_count == 0:
line_count = 1
+ if start_line == 0:
+ continue
matches.setdefault(filename, []).append(Range(start_line, line_count))
return matches
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112056.380869.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211020/899ee4d6/attachment-0001.bin>
More information about the cfe-commits
mailing list