[cfe-dev] Static analysis without compilation

Matthieu Monrocq matthieu.monrocq at gmail.com
Mon Dec 3 09:51:19 PST 2012


On Mon, Dec 3, 2012 at 12:52 PM, Konstantin Tokarev <annulen at yandex.ru>wrote:

>
> 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
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>

It was my belief that in -fsyntax-only Clang was really close to support
MFC (if not supported it completely) and that only the CodeGen part was
really lacking on Windows.

Are you sure that you used the microsoft compatibility mode
(-fms-compatibility) ?

-- Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121203/1d68ffd8/attachment.html>


More information about the cfe-dev mailing list