[PATCH] D33930: Do not pick up by default the LLVM style if passing -format

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 6 04:22:53 PDT 2017


v.g.vassilev updated this revision to Diff 101540.
v.g.vassilev added a comment.

Use string.


https://reviews.llvm.org/D33930

Files:
  clang-tidy/tool/run-clang-tidy.py


Index: clang-tidy/tool/run-clang-tidy.py
===================================================================
--- clang-tidy/tool/run-clang-tidy.py
+++ clang-tidy/tool/run-clang-tidy.py
@@ -105,6 +105,8 @@
   invocation = [args.clang_apply_replacements_binary]
   if args.format:
     invocation.append('-format')
+  if args.style:
+    invocation.append('-style=' + args.style)
   invocation.append(tmpdir)
   subprocess.call(invocation)
 
@@ -148,6 +150,8 @@
   parser.add_argument('-fix', action='store_true', help='apply fix-its')
   parser.add_argument('-format', action='store_true', help='Reformat code '
                       'after applying fixes')
+  parser.add_argument('-style', default='file', help='The style of reformat '
+                      'code after applying fixes')
   parser.add_argument('-p', dest='build_path',
                       help='Path used to read a compile command database.')
   parser.add_argument('-extra-arg', dest='extra_arg',


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33930.101540.patch
Type: text/x-patch
Size: 969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170606/b97837cc/attachment.bin>


More information about the cfe-commits mailing list