[PATCH] D49864: The script clang-tidy-diff.py doesn't accept 'pass by' options (--)
Jano Simas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 26 09:57:42 PDT 2018
janosimas created this revision.
janosimas added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.
When the argument -- is passed to clang-tidy-diff.py it should pass the following arguments to clang-tidy.
It does that but also includes -- as an argument,
there should be a +1 in the '--' index.
So only the following arguments as passed to clang-tidy.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D49864
Files:
clang-tidy/tool/clang-tidy-diff.py
Index: clang-tidy/tool/clang-tidy-diff.py
===================================================================
--- clang-tidy/tool/clang-tidy-diff.py
+++ clang-tidy/tool/clang-tidy-diff.py
@@ -70,7 +70,7 @@
clang_tidy_args = []
argv = sys.argv[1:]
if '--' in argv:
- clang_tidy_args.extend(argv[argv.index('--'):])
+ clang_tidy_args.extend(argv[argv.index('--')+1:])
argv = argv[:argv.index('--')]
args = parser.parse_args(argv)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49864.157515.patch
Type: text/x-patch
Size: 453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180726/7284170f/attachment.bin>
More information about the cfe-commits
mailing list