By using readlines() when splitting the lines of code for formatted and
unformatted files, clang-format-diff.py reports lines that do not have
diffs as having diffs because the line endings in the original code
differs from the line endings generated by clang-format on Windows.
When we run with -i, it does not change the line endings, so if we run
without -i, clang-format-diff.py shows that there are still diffs. This
fix changes clang-format-diff.py to use read().split() which discards
line endings, fixing this problem.
Details
Details
- Reviewers
- None
Ran clang-format-diff.py on Windows to confirm that after fixing a line, clang-format-diff.py no longer see that line as having a diff.
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 4824 Build 4840: [Placeholder Plan] Wait for 30 Seconds