Clang Static Analyzer | Enabling Diagnostics that Cross File Boundaries

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Clang Static Analyzer | Enabling Diagnostics that Cross File Boundaries

Xin Wang via cfe-dev
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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Clang Static Analyzer | Enabling Diagnostics that Cross File Boundaries

Xin Wang via cfe-dev
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 if you are interested!

Devin


On Jun 15, 2017, at 3:32 AM, Malhar Thakkar via cfe-dev <[hidden email]> 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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Clang Static Analyzer | Enabling Diagnostics that Cross File Boundaries

Xin Wang via cfe-dev
The scan-build's cross-file diagnostic support is being currently worked
on in https://reviews.llvm.org/D30406

On 6/16/17 12:15 AM, Devin Coughlin via cfe-dev wrote:

> 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 if you are interested!
>
> Devin
>
>
>> On Jun 15, 2017, at 3:32 AM, Malhar Thakkar via cfe-dev
>> <[hidden email] <mailto:[hidden email]>> 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
>> [hidden email] <mailto:[hidden email]>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...