diff options
Diffstat (limited to 'clang-tools-extra/clang-format/clang-format-diff.py')
-rwxr-xr-x | clang-tools-extra/clang-format/clang-format-diff.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-format/clang-format-diff.py b/clang-tools-extra/clang-format/clang-format-diff.py index cd01f93db4c..a22392b39f0 100755 --- a/clang-tools-extra/clang-format/clang-format-diff.py +++ b/clang-tools-extra/clang-format/clang-format-diff.py @@ -106,10 +106,8 @@ def main(): ranges.append((filename, int(match.group(1)), line_count)) # Reverse the ranges so that the reformatting does not influence file offsets. - ranges.reverse() - - # Do the actual formatting. - for r in ranges: + for r in reversed(ranges): + # Do the actual formatting. formatRange(r, args.style) |