[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)
Donát Nagy via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 29 06:15:50 PDT 2025
NagyDonat wrote:
This change itself seems to be correct, but I have doubts about the overall viability of the implementation of this `alpha` checker.
In particular I don't like that it maintains its independent model about things that are modeled more accurately by other checkers. For example it [recognizes a few allocation functions](https://clang.llvm.org/doxygen//PointerArithChecker_8cpp_source.html#l00201) instead of relying on `DynamicMemoryModeling` (aka `MallocChecker.cpp`) which provides more accurate modeling (e.g. recognizes more functions).
Based on this impression I was planning to throw out the existing implementation and reimplement the functionality of this `alpha` checker in a more principled fashion. (I expect that I would be able to do this later this year.) However I'm happy to abandon this plan if you think that this checker is salvageable – and I would be especially grateful if you have plans for stabilizing it and bringing it out of `alpha` state.
@alejandro-alvarez-sonarsource @steakhal What are your high-level plans for this checker? Is this patch just an ad-hoc bugfix, or part of a more systemic cleanup?
https://github.com/llvm/llvm-project/pull/155855
More information about the cfe-commits
mailing list