[cfe-dev] Using libclang for simple per file static analysis

Sean Silva silvas at purdue.edu
Mon Jul 1 14:32:07 PDT 2013


On Mon, Jul 1, 2013 at 1:30 PM, Catalin Iacob <iacobcatalin at gmail.com>wrote:
>
> The general pattern seemed to be that too little is reported when
> parsing incomplete files.
>

The sad truth is that it's not really possible to even parse C++ correctly
without the complete translation unit.

I recommend looking at generating a JSON compilation database, which is the
usual way to work around the issue: <
http://clang.llvm.org/docs/JSONCompilationDatabase.html>.

-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130701/07ea9145/attachment.html>


More information about the cfe-dev mailing list