[cfe-dev] Clang Static Analyzer | Enabling Diagnostics that Cross File Boundaries

Devin Coughlin via cfe-dev cfe-dev at lists.llvm.org
Thu Jun 15 14:15:45 PDT 2017


Malhar,

The clang static analyzer doesn’t support analysis between translation units (for example when a path crosses from one .c file into another .c file). 

The analyzer does support when a path crosses from a .c to a .h (this is technically cross file) — but the scan-build tool cannot visualize those diagnostics in html. Other tools (such as Xcode) can visualize paths between a .c and header files.

In event, I suspect you are looking for true cross-translation unit analysis — which the analyzer does not support.

There is some very preliminary investigation of cross-translation unit support in https://reviews.llvm.org/D30691 <https://reviews.llvm.org/D30691> if you are interested!

Devin


> On Jun 15, 2017, at 3:32 AM, Malhar Thakkar via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hello everyone,
> 
> Could anyone please guide me on how to enable diagnostics that cross file boundaries while using scan-build?
> 
> Thank you.
> 
> 
> 
> Regards,
> Malhar
>> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170615/74a6200e/attachment.html>


More information about the cfe-dev mailing list