Whether Clang static analyzer support customize compiler?

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!

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.

Yes, Ted. I tried option.
While it seems:
When I directly build my code with cgcc <many options …> . It is OK, and build succefully and no warnings.
When use as scan-build --use-cc=cgcc <many options …> . 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.

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.