[PATCH] D32294: [clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds
Kim Gräsman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 20 09:05:23 PDT 2017
kimgr added a comment.
Python 3 concern inline
================
Comment at: clang-tidy/tool/run-clang-tidy.py:100
+ except:
+ print >>sys.stderr, "Unable to run clang-apply-replacements."
+ sys.exit(1)
----------------
alexfh wrote:
> "Unable to run clang-apply-replacements" without any details seems to be far worse than just a default stack trace from an unhandled exception. At the very least add the message from the exception.
I don't know what the general Python3 ambitions of this script is, but it would be nice if the new code didn't use the Python2-only print style.
You can:
from __future__ import print_function
at the top of the file, and then use Python3-style print:
print("Unable to run clang-apply-replacements", file=sys.stderr)
https://reviews.llvm.org/D32294
More information about the cfe-commits
mailing list