[cfe-dev] Static analysis without compilation

Konstantin Tokarev annulen at yandex.ru
Mon Dec 3 03:52:29 PST 2012


03.12.2012, 15:47, "Sujit Kamthe" <Sujit.Kamthe at kpitcummins.com>:
> Hi,
>
> Is it possible to do static analysis only without pre-compiling the source code.

Yes. Static analysis is unrelated to compilation. However, it's usually much slower than regular compilation.

>
> Can I just run some static analysis checks on the source code without specifying any dependencies (include files)?

Some tools like cppcheck can do it, however it's not possible with clang.

> Doing this static analysis can be performed even if there are few compilation errors in the source code.

It's not possible to analyse invalid code properly.

>
> This is important as clang does not support some syntax like MFC is not fully supported.

You may want to switch to other analysis tool, or wait until MFC is supported.

-- 
Regards,
Konstantin



More information about the cfe-dev mailing list