[clang-tools-extra] r218227 - run-clang-tidy.py: don't fail when running without -checks=.
Alexander Kornienko
alexfh at google.com
Sun Sep 21 17:07:07 PDT 2014
Author: alexfh
Date: Sun Sep 21 19:07:07 2014
New Revision: 218227
URL: http://llvm.org/viewvc/llvm-project?rev=218227&view=rev
Log:
run-clang-tidy.py: don't fail when running without -checks=.
Modified:
clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
Modified: clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py?rev=218227&r1=218226&r2=218227&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py (original)
+++ clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py Sun Sep 21 19:07:07 2014
@@ -131,8 +131,11 @@ def main():
args = parser.parse_args()
try:
- print subprocess.check_output([args.clang_tidy_binary, '-list-checks',
- '-checks='+args.checks, 'dummy'])
+ invocation = [args.clang_tidy_binary, '-list-checks']
+ if args.checks:
+ invocation.append('-checks='+args.checks)
+ invocation.append('-')
+ print subprocess.check_output(invocation)
except:
print >>sys.stderr, "Unable to run clang-tidy."
sys.exit(1)
More information about the cfe-commits
mailing list