[clang] [analyzer][NFC] Explain why operator new/delete should never be eval-called (PR #161370)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 30 07:27:41 PDT 2025


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

Overall I agree with these comments.

However, note that in `MallocChecker.cpp` we already have precedent for code that performs `EvalCall` for user-defined functions if they are marked by ownership annotations: https://github.com/llvm/llvm-project/blob/98d43ef2d842eb8b552b244a4ed6218d757682a1/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp#L1709

Once I though about introducing an "EvalCall, but  if the function cannot be inlined" callback, but it was shelved for some reason that I don't recall. Perhaps it should be resurrected for situations like this?

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


More information about the cfe-commits mailing list