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
This commit is contained in:
Daniel Jasper 2014-11-14 13:27:28 +00:00
parent 6c0ee17b89
commit c670688add
1 changed files with 4 additions and 0 deletions

View File

@ -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')