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

Anna Zaks ganna at apple.com
Mon Nov 18 10:44:06 PST 2013


On Nov 17, 2013, at 1:37 PM, Richard <legalize at xmission.com> wrote:

> 
> In article <E835CF96-B8CC-4541-B9F1-DA06B1B6895E at apple.com>,
>    Jordan Rose <jordan_rose at apple.com> writes:
> 
>> Hi, Richard. "clang --analyze" is not intended to be a usual interface for
>> the analyzer, merely an invocation that higher-level tools can use. The
>> correct way to run the analyzer, even on a single file, is through the
>> scan-build tool, which provides HTML output that shows you the full path to
>> the purported bug. (Or through Xcode, of course, if you're on a Mac.)
> 
> Thanks for pointing this out, Jordan.  I'm away from the computer
> where I have clang installed at the moment.  Does the man page for
> clang mention any of this where --analyze is described?  I don't think
> it was.
scan-build and Xcode are considered to be the tools to use when you want to run the "clang static analyzer". They invoke "clang --analyze" during processing (clang --analyze is not considered to be a user-level tool).

See http://clang-analyzer.llvm.org for more info.

Anna.

> -- 
> "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
>     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
>         The Terminals Wiki <http://terminals.classiccmp.org>
>  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list