[PATCH] D112008: Add -extra-arg-clang-tidy to {clang-tidy-diff,run-clang-tidy}.py
Xavier Roche via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 18 08:54:14 PDT 2021
Xavier updated this revision to Diff 380429.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112008/new/
https://reviews.llvm.org/D112008
Files:
clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Index: clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
===================================================================
--- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -104,6 +104,7 @@
start.append('-extra-arg=%s' % arg)
for arg in extra_arg_before:
start.append('-extra-arg-before=%s' % arg)
+ start += args.extra_arg_clang_tidy
start.append('-p=' + build_path)
if quiet:
start.append('-quiet')
@@ -241,6 +242,9 @@
action='append', default=[],
help='Additional argument to prepend to the compiler '
'command line.')
+ parser.add_argument('-extra-arg-clang-tidy', dest='extra_arg_clang_tidy',
+ action='append', default=[],
+ help='Additional argument to use with clang-tidy.')
parser.add_argument('-quiet', action='store_true',
help='Run clang-tidy in quiet mode')
args = parser.parse_args()
Index: clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
===================================================================
--- clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
+++ clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
@@ -158,6 +158,9 @@
action='append', default=[],
help='Additional argument to prepend to the compiler '
'command line.')
+ parser.add_argument('-extra-arg-clang-tidy', dest='extra_arg_clang_tidy',
+ action='append', default=[],
+ help='Additional argument to use with clang-tidy.')
parser.add_argument('-quiet', action='store_true', default=False,
help='Run clang-tidy in quiet mode')
clang_tidy_args = []
@@ -233,6 +236,7 @@
common_clang_tidy_args.append('-extra-arg=%s' % arg)
for arg in args.extra_arg_before:
common_clang_tidy_args.append('-extra-arg-before=%s' % arg)
+ common_clang_tidy_args += args.extra_arg_clang_tidy
for name in lines_by_file:
line_filter_json = json.dumps(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112008.380429.patch
Type: text/x-patch
Size: 2131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211018/b48436db/attachment-0001.bin>
More information about the cfe-commits
mailing list