Index: clang-tidy/tool/run-clang-tidy.py =================================================================== --- clang-tidy/tool/run-clang-tidy.py +++ clang-tidy/tool/run-clang-tidy.py @@ -89,12 +89,16 @@ def apply_fixes(args, tmpdir): """Calls clang-apply-fixes on a given directory. Deletes the dir when done.""" - invocation = [args.clang_apply_replacements_binary] - if args.format: - invocation.append('-format') - invocation.append(tmpdir) - subprocess.call(invocation) - shutil.rmtree(tmpdir) + try: + invocation = [args.clang_apply_replacements_binary] + if args.format: + invocation.append('-format') + invocation.append(tmpdir) + subprocess.call(invocation) + shutil.rmtree(tmpdir) + except: + print >>sys.stderr, "Unable to run clang-apply-replacements." + sys.exit(1) def run_tidy(args, tmpdir, build_path, queue):