[cfe-dev] clang --analyze limitations
Douglas Gregor
dgregor at apple.com
Thu Jun 23 11:51:30 PDT 2011
On Jun 23, 2011, at 10:57 AM, Jack Howarth wrote:
> Is there a particular reason why the clang --analyze feature was designed
> to short-circuit compilations?
Just because it needs only a -fsyntax-check of the code, and the analyzer was useful long before Clang was useful for generating code. Plus, it's fairly common for people to use their normal compiler for building, but toss in Clang's static analyzer to find more bugs as they build.
> Currently it appears that 'clang --analyze' only
> calls the static analyzer which seems unnecessarily limiting. If clang were to
> call the static analyzer and then proceed with the normal compilation, this
> feature would be much easier to use since simply adding --analyze to the compile
> flags would allow a complete build to be quickly run through the static analyzer
> as part of the normal build.
In the grand scheme of things, we'd love for the static analyzer to simply become a plug-in that can get run during a normal "build", regardless of whether that build is just a syntax-check (as we do now) or a build that generates object code.
- Doug
More information about the cfe-dev
mailing list