[cfe-dev] How to use clang static code analysis without building a project

John Smith lbalbalba at gmail.com
Mon Feb 11 06:45:56 PST 2013


Hi,


As far as I know, clang cant analyze without building. There are good
technical reasons for this, but ive forgotten what they are though.

Sorry. Perhaps you can convince the people that provide you the code
that you cant do proper analysis without being able to build it, so
that they will supply you buildable projects in the future.


John Smith.


On Fri, Feb 8, 2013 at 4:27 PM, Sz. G. <semyazz at gmail.com> wrote:
> Hi,
>
> I'm new to Objective-C and whole iOS platform, but I'd know if there is a
> possibility to use Clang without building whole project.
>
> I'm doing security assessments and sometimes they include code review. I'd
> like to write some scripts that would use clang and analyze code before I'll
> read it manually. The main problem is that, I'm not always able to compile
> code. Sometimes I get only source code without external dependencies and I
> can't build and run it, so my main question is:
>
> Is Clang able to analyze code without building it? Is there any clang API to
> use it outside the XCode, in some scripts that will run it, and get clang's
> results? I just read that there is console runner, but when I briefly read
> the docs, I saw that that console tool builds project.
>
> Thx in advance
> --
> Sz. G.
> _______________________________________________
> 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