[cfe-dev] clang --analyze: how do I get more verbose diagnostics?

Joerg Sonnenberger joerg at britannica.bec.de
Tue Nov 19 09:23:20 PST 2013


On Tue, Nov 19, 2013 at 09:59:36AM -0700, Richard wrote:
> 
> In article <20131119113333.GA5152 at britannica.bec.de>,
>     Joerg Sonnenberger <joerg at britannica.bec.de> writes:
> 
> > On Mon, Nov 18, 2013 at 09:54:17PM -0700, Richard wrote:
> > > We use SCons for our build system.  When I run 'scan-build scons
> > > <args>', my build runs for a long time and reports various warnings
> > > from the analysis as it runs.
> > 
> > I would recomment starting by replacing scons, but at the very least
> > sure that your construct honors CC etc from environment.
> 
> Sorry, but suggesting someone replace their build system is not 
> going to be taken seriously.  This also runs contrary to the entire
> point of scan-build.

Well, some of the requirements of scan-build require a certain sanity
from the invoked build system. I have had way too much fun with scons to
know that it does break all kinds of common conventions. The way scons
constructs behave by default ignores PATH for example. CCC_CC and
friensd are other possible culprits in this context.

> If my build environment wasn't getting clang for compilation, then I
> wouldn't be getting clang analysis diangostics in the output of the
> build as I already stated was happening.

Whether you get the output somewhere and whether it is consistent with
the expectations of the tool are quite different beasts.

Joerg



More information about the cfe-dev mailing list