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

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 07:33:48 PDT 2024


https://github.com/NagyDonat commented:

I think this checker is definitely good enough to be moved out of `alpha`, but I'm not sure that it should be placed in the `core` group, where we have a strong requirement that "These checkers must be always switched on as other checker rely on them.".

There might be projects that intentionally use nonstandard but "works on our system" pointer subtraction to optimize performance, perhaps e.g. on a low-level system.

As an alternative of placing this in `core`, we could move it to e.g. `security.PointerSub` -- but I'd prefer moving the "must be always switched on" requirement from "all core checkers" to those concrete checkers that are also needed. I think `core` conflates "checks a core language feature" and "is important for proper modeling", which is not ideal.

@steakhal @haoNoQ @Xazax-hun What do you think about this?

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


More information about the cfe-commits mailing list