diff options
author | Daniel Jasper <djasper@google.com> | 2014-11-14 13:27:28 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-11-14 13:27:28 +0000 |
commit | c670688addc0a1e8a14b6174ff3626dce82f88ab (patch) | |
tree | 0a729b990b9b48da8225f8c0a89cbfbac91813a3 /clang/tools/clang-format | |
parent | 6c0ee17b8973eb8622a982d96f6f2d0397b8e58b (diff) | |
download | bcm5719-llvm-c670688addc0a1e8a14b6174ff3626dce82f88ab.tar.gz bcm5719-llvm-c670688addc0a1e8a14b6174ff3626dce82f88ab.zip |
clang-format: Give clang-format-diff.py a -v option.
With it, it prints the file being formatted. Apparently people are
formatting thousands of files and some progress indication is helpful.
llvm-svn: 221990
Diffstat (limited to 'clang/tools/clang-format')
-rwxr-xr-x | clang/tools/clang-format/clang-format-diff.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py index b896ffce932..247dace9be0 100755 --- a/clang/tools/clang-format/clang-format-diff.py +++ b/clang/tools/clang-format/clang-format-diff.py @@ -52,6 +52,8 @@ def main(): r'|protodevel)', help='custom pattern selecting file paths to reformat ' '(case insensitive, overridden by -regex)') + parser.add_argument('-v', '--verbose', action='store_true', + help='be more verbose, ineffective without -i') parser.add_argument( '-style', help= @@ -89,6 +91,8 @@ def main(): # Reformat files containing changes in place. for filename, lines in lines_by_file.iteritems(): + if args.i and args.verbose: + print 'Formatting', filename command = [binary, filename] if args.i: command.append('-i') |