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

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 07:02:56 PDT 2024


balazske wrote:

> 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).

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


More information about the cfe-commits mailing list