[PATCH] D28334: [clang-tidy] Add -extra-arg and -extra-arg-before to run-clang-tidy.py

Ehsan Akhgari via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 18 09:59:40 PST 2017


ehsan marked an inline comment as done.
ehsan added inline comments.


================
Comment at: clang-tidy/tool/run-clang-tidy.py:80
+  for arg in extra_arg:
+      start.append('-extra-arg=%s' % arg[0])
+  for arg in extra_arg_before:
----------------
alexfh wrote:
> Why arg[0] and not just arg?
With nargs=1, extra_arg would be something like [['foo'], ['bar']] if -extra-arg foo -extra-arg bar is passed.  But I realized that there is no good reason why I need nargs=1 since action='append' will make the arg parser consume one argument, so I'll remove that and simplify this to just arg.


https://reviews.llvm.org/D28334





More information about the cfe-commits mailing list