| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
support utilities
Summary: https://bugs.llvm.org/show_bug.cgi?id=36858 identifies .hh as a missing C++ header extension file while making this change I realized there was no support for .cs files which were added recently
Reviewers: pseyfert, klimek, owenpan
Reviewed By: klimek
Subscribers: cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D67949
llvm-svn: 372760
|
|
|
|
|
|
|
|
|
| |
The description in clang-format-diff.py is more useful than the one
in `clang-format-diff -h`, so use the same description in both places.
Differential Revision: https://reviews.llvm.org/D64998
llvm-svn: 366828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The python documentation says "it’s highly recommended that you use raw strings for all but the simplest expressions." (https://docs.python.org/3/library/re.html)
So do that with the attached patch generated by
sed -i -e "s/re.search('/re.search(r'/g" $(git grep -l 're.search(')
The warning can be seen in e.g. python3.7:
$ python3.7 -Wd
>>> import re; re.search('\s', '')
<stdin>:1: DeprecationWarning: invalid escape sequence \s
Commited on behalf of Marco Falke.
Differential Revision: https://reviews.llvm.org/D57528
llvm-svn: 353707
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
| |
StringIO is obsoleted in Python3, replaced by io.BytesIO or io.StringIO depending on the use.
Differential Revision: https://reviews.llvm.org/D55196
llvm-svn: 350318
|
|
|
|
|
|
|
|
| |
Make scripts more future-proof by importing most __future__ stuff.
Differential Revision: https://reviews.llvm.org/D55208
llvm-svn: 349504
|
|
|
|
|
|
|
|
| |
Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version.
Differential Revision: https://reviews.llvm.org/D55213
llvm-svn: 349454
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: It is not necessary, but would be nice if the script run on python3 as well (as opposed to only python2, which is going to be deprecated https://pythonclock.org/)
Contributed by MarcoFalke!
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: lebedev.ri, sammccall, cfe-commits
Differential Revision: https://reviews.llvm.org/D48098
llvm-svn: 338839
|
|
|
|
|
|
| |
clang-format-diff
llvm-svn: 288605
|
|
|
|
|
|
| |
Patch by Kwasi Mensah, thank you.
llvm-svn: 258328
|
|
|
|
|
|
| |
clang-format-diff.py.
llvm-svn: 249567
|
|
|
|
|
|
| |
Patch by Martin Probst. Thank you.
llvm-svn: 231926
|
|
|
|
| |
llvm-svn: 223685
|
|
|
|
|
|
|
| |
With it, it prints the file being formatted. Apparently people are
formatting thousands of files and some progress indication is helpful.
llvm-svn: 221990
|
|
|
|
|
|
|
|
| |
On operating systems like the BSDs, it is typically the case that
/usr/bin/python does not exist. We should therefore use /usr/bin/env
instead. This is also done in various other scripts in tools/.
llvm-svn: 216945
|
|
|
|
| |
llvm-svn: 208766
|
|
|
|
|
|
| |
Support for protocol buffer files seems complete enough.
llvm-svn: 199750
|
|
|
|
| |
llvm-svn: 197668
|
|
|
|
|
|
|
|
|
|
| |
While debating the finer points of file extension matching, we somehow missed
the bigger problem that the current code will match anything starting with the
default or user-specified pattern (e.g. lit.site.cfg.in).
Fix this by doing what find(1) does, implicitly wrapping the pattern with ^$.
llvm-svn: 197608
|
|
|
|
|
|
| |
It's handled correctly as a C-family language.
llvm-svn: 197542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
-regex and -iregex both mimic options of the find utility.
Made the default list of extensions case-insensitive, so that it's not only C
and CPP extensions are accepted in upper case.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2415
llvm-svn: 197378
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for more filename extensions based on the list in the clang
plus JavaScript.
Also adds a -regex option so users can override defaults if they have unusual
file extensions or want to format everything in the diff.
Keeping with tradition the flag is modelled on Unix conventions, this time
matching the semantics of find(1).
llvm-svn: 196917
|
|
|
|
|
|
|
| |
Also use write() for unified diff output to avoid further processing by the
print function (e.g. trailing newline).
llvm-svn: 196484
|
|
|
|
|
|
| |
Also update docs to reflect recently changed -i inplace edit behaviour.
llvm-svn: 196336
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Copy and paste error in r190935..
llvm-svn: 191137
|
|
|
|
|
|
| |
clang-format's -lines parameter makes this significantly easier.
llvm-svn: 190935
|
|
|
|
|
|
| |
messages.
llvm-svn: 189765
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
scripts.
llvm-svn: 179676
|
|
|
|
| |
llvm-svn: 179377
|
|
|
|
|
|
|
|
| |
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
|
|
llvm-svn: 177506
|