run-clang-tidy.py: don't fail when running without -checks=.

llvm-svn: 218227
This commit is contained in:
Alexander Kornienko 2014-09-22 00:07:07 +00:00
parent 5d45962b2c
commit f73fe3a04e

View File

@ -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)