[clang] [clang][analyzer] Move 'alpha.core.PointerSub' checker into 'core.PointerSub' (PR #107596)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 06:10:26 PDT 2024


https://github.com/steakhal approved this pull request.

> > I'm not satisfied with the quality of the reports. The report refers to `Subtraction of two pointers that do not point into the same array is undefined behavior` without pointing out where the two pointers point to (and/or where are they declared, or set to point to different objects). Without improving the diagnostics, I don't think we should move this out of alpha.
> 
> For this purpose the report notes were added. In the CodeChecker interface the arrow beneath "Notes" can be expanded to see these notes. Sure it can be even more exact if all the super-regions were pointed out but in the current reports it is probably not difficult to recognize what the different regions are (different variables or different members of a struct or a variable and a member of the same struct as the variable).

I see! Thanks. In that case, I don't oppose.

https://github.com/llvm/llvm-project/pull/107596


More information about the cfe-commits mailing list