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

Cai Qihang yucai.leo at gmail.com
Wed Feb 23 19:25:10 PST 2011


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/20110224/f2083aac/attachment.html>


More information about the cfe-dev mailing list