[PATCH] D9600: Add scan-build python implementation

Jonathan Roelofs via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 20 08:59:59 PST 2015


jroelofs added inline comments.

================
Comment at: tools/scan-build-py/libear/__init__.py:1
@@ +1,2 @@
+# -*- coding: utf-8 -*-
+#                     The LLVM Compiler Infrastructure
----------------
rizsotto.mailinglist wrote:
> dcoughlin wrote:
> > How does this file fit into the overall build picture? Will this file go away once scan-build-py is built with the common clang cmake?
> this is quiet confusing me. previously you were asking make it work without installation. this file makes it possible to compile the `ear` library compiled before the build runs to use as preloaded library. the thing which is not needed is the CMakefile actually.
I think the best way forward would be to teach the CMake build how to run `setup.py`.  Then this would work both with and without installation, and it'd use the same code paths for both.

================
Comment at: tools/scan-build-py/libscanbuild/driver.py:67
@@ +66,3 @@
+    except Exception:
+        logging.exception("Something unexpected had happened.")
+        return 127
----------------
rizsotto.mailinglist wrote:
> dcoughlin wrote:
> > I think this error message can be improved. Perhaps "Unexpected error running intercept-build"?
> this line is printed as:
> 
>   intercept-build: ERROR: Something unexpected had happened.
>   (and the stack-trace)
> 
> because the logging formating. so, 'intercept-build' and 'error' will be part of the message anyway.
Is there a pythonic way of doing llvm crash handlers? I.e. the "here's the steps to reproduce this, a stack trace, and a bug report url" things that clang spits out.


http://reviews.llvm.org/D9600





More information about the cfe-commits mailing list