[PATCH] D48523: [clang-tidy] Update run-clang-tidy.py with vfsoverlay arg
Jeremy Demeule via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 23 13:39:47 PDT 2018
jdemeule created this revision.
jdemeule added a reviewer: alexfh.
Herald added subscribers: cfe-commits, xazax.hun.
Updating the run-clang-tidy.py script to allow specification of the
vfsoverlay argument to the clang-tidy invocation.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48523
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
@@ -75,8 +75,8 @@
def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
- header_filter, extra_arg, extra_arg_before, quiet,
- config):
+ vfsoverlay, header_filter, extra_arg, extra_arg_before,
+ quiet, config):
"""Gets a command line for clang-tidy."""
start = [clang_tidy_binary]
if header_filter is not None:
@@ -98,6 +98,8 @@
for arg in extra_arg_before:
start.append('-extra-arg-before=%s' % arg)
start.append('-p=' + build_path)
+ if vfsoverlay is not None:
+ start.append('-vfsoverlay=' + vfsoverlay)
if quiet:
start.append('-quiet')
if config:
@@ -158,9 +160,10 @@
while True:
name = queue.get()
invocation = get_tidy_invocation(name, args.clang_tidy_binary, args.checks,
- tmpdir, build_path, args.header_filter,
- args.extra_arg, args.extra_arg_before,
- args.quiet, args.config)
+ tmpdir, build_path, args.vfsoverlay,
+ args.header_filter, args.extra_arg,
+ args.extra_arg_before, args.quiet,
+ args.config)
sys.stdout.write(' '.join(invocation) + '\n')
return_code = subprocess.call(invocation)
if return_code != 0:
@@ -209,6 +212,9 @@
'code after applying fixes')
parser.add_argument('-p', dest='build_path',
help='Path used to read a compile command database.')
+ parser.add_argument('-vfsoverlay', dest='vfsoverlay',
+ help='Overlay the virtual filesystem described by file '
+ 'over the real file system.')
parser.add_argument('-extra-arg', dest='extra_arg',
action='append', default=[],
help='Additional argument to append to the compiler '
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48523.152605.patch
Type: text/x-patch
Size: 2220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180623/6eae88e4/attachment-0001.bin>
More information about the cfe-commits
mailing list