[cfe-dev] Whether Clang static analyzer support customize compiler?

Ted Kremenek kremenek at apple.com
Wed Feb 23 20:30:15 PST 2011


Hi Cai,

Hmm.  Without seeing the raw output it's hard to determine what is the issue.

Although gross, have you tried editing ccc-analyzer and replacing the reference to gcc with your custom compiler?  It would be useful to know if that at least works.

On Feb 23, 2011, at 7:25 PM, Cai Qihang wrote:

> Yes, Ted. I tried option.
> While it seems:
> When I directly build my code with cgcc <many options ...><target file> . It is OK, and build succefully and no warnings.
> When use as scan-build  --use-cc=cgcc <many options ...><target file> . It will turn out the options can not be recognised and scan stopped.
> (I added the cgcc into PATH)
> So I'm not sure whether it come from scan-build limition.
> On Thu, Feb 24, 2011 at 10:58 AM, Ted Kremenek <kremenek at apple.com> wrote:
> Have you looked at the --use-cc and --use-cxx options for scan-build?
> 
> $ scan-build
> ...
>  --use-cc [compiler path]   - By default, scan-build uses 'gcc' to compile and link
>  --use-cc=[compiler path]     your C and Objective-C code. Use this option
>                              to specify an alternate compiler.
> 
>  --use-c++ [compiler path]  - By default, scan-build uses 'g++' to compile and link
>  --use-c++=[compiler path]    your C++ and Objective-C++ code. Use this option
>                              to specify an alternate compiler.
> 
> 
> On Feb 23, 2011, at 6:37 PM, Cai Qihang wrote:
> 
> > Hi:
> >      In my project, I have another compiler which based on gcc while did some specific extensions, such as function defination prefix and types recognize.
> > When I use CSA scan the build process, I saw the gcc is replaced by ccc-analyzer and g++ by c++analyzer, while the compiler command which start with my customized compiler such as "cgcc", it won't work. I wonder whether CSA support other gcc-based compiler merged in? I mean  "customized compiler"+ "Analyzer", and build a binary as ccc-analyzer? Any friends tried that?
> >     Thanks!
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110223/13dd05e0/attachment.html>


More information about the cfe-dev mailing list