[clang] [clang][analyzer] Improved PointerSubChecker (PR #93676)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Fri May 31 07:22:52 PDT 2024
balazske wrote:
With the current version I have the following observations:
- There is a warning for `(&x + 1) - &x` and `(&x - 1) - &x`. Should this be fixed?
- The code `(int *)((char *)(&a[4]) + sizeof(int)) - &a[4]` produces no warning but `(int *)((char *)(&a[4]) + 1) - &a[4]` produces warning. For 2-dimensional arrays there is warning for all of these cases (lines 44-47 in the test file). Is this possible to fix (to get warning in all cases), or no warning is needed here?
https://github.com/llvm/llvm-project/pull/93676
More information about the cfe-commits
mailing list