Skip to content
Commit 164c8e18 authored by Daniel Jasper's avatar Daniel Jasper
Browse files

clang-format: Fix clang-format-diff.py according to diff specification.

Patch by Alp Toker. Many thanks!

Original descriptions:
clang-format-diff incorrectly modifies unchanged lines due to an error
in diff parsing.

The unified diff format has a default line change count of 1, and 0 may
be specified to indicate that no lines have been added. This patch
updates the parser to accurately reflect the diff specification.

This also has the benefit of stabilising the operation so it will
produce the same output when run multiple times on the same changeset,
which was previously not the case.

No tests added because this script is not currently tested (though we
should look into that!)

llvm-svn: 191820
parent 8358c414
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment