summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-format/clang-format-diff.py
Commit message (Collapse)AuthorAgeFilesLines
* Changed clang-format-diff.py to output diff by default. Added -i option to ↵Alexander Kornienko2013-10-111-3/+22
| | | | | | | | | | | | | | | | | | | | | | apply changes to files instead. Summary: "svn diff|clang-format-diff.py" will just output the diff. Now it's possible to use: svn diff|clang-format-diff.py|patch -p0 as an equivalent to: svn diff|clang-format-diff.py -i ;) Reviewers: djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1840 llvm-svn: 192505
* clang-format: Don't exit with failure on empty files.Daniel Jasper2013-10-081-1/+2
| | | | | | | | | | Also let clang-format-diff.py detect errors based on clang-format's return code. Otherwise messages like "Can't find usable .clang-format, falling back to LLVM style" can make it fail, which might be undesired. Patch by Alp Toker. Thank you! llvm-svn: 192184
* clang-format: Fix clang-format-diff.py according to diff specification.Daniel Jasper2013-10-021-2/+5
| | | | | | | | | | | | | | | | | | | | | 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
* Fix clang-format-diff.py to accept -style again.Daniel Jasper2013-09-211-1/+1
| | | | | | Copy and paste error in r190935.. llvm-svn: 191137
* Simplify clang-format-diff.py using new clang-format options.Daniel Jasper2013-09-181-59/+26
| | | | | | clang-format's -lines parameter makes this significantly easier. llvm-svn: 190935
* Added WebKit style to the BasedOnStyle handling and to the relevant help ↵Alexander Kornienko2013-09-021-3/+5
| | | | | | messages. llvm-svn: 189765
* Fix default value of clang-format-diff's -p option.Daniel Jasper2013-05-301-1/+1
| | | | | | | This way, it has the same default as 'patch' and also the example in the code makes more sense as it is explicitly setting -p 1. llvm-svn: 182923
* Small improvements to clang-format documentation and integrationDaniel Jasper2013-04-171-1/+2
| | | | | | scripts. llvm-svn: 179676
* Fix clang-format-diff.py script.Daniel Jasper2013-04-121-1/+1
| | | | llvm-svn: 179377
* Improvements to clang-format integrations.Daniel Jasper2013-04-091-5/+5
| | | | | | | | This adds an emacs editor integration (thanks to Ami Fischman). Also pulls out the style into a variable for the vi integration and just uses clang-formats defaults style in clang-format-diff.py. llvm-svn: 179098
* Add clang-format binary to cfe.Daniel Jasper2013-03-201-0/+115
llvm-svn: 177506
OpenPOWER on IntegriCloud