From c670688addc0a1e8a14b6174ff3626dce82f88ab Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 14 Nov 2014 13:27:28 +0000 Subject: [PATCH] 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 --- clang/tools/clang-format/clang-format-diff.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py index b896ffc..247dace 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') -- 2.7.4