[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

Donát Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 26 10:25:51 PDT 2025


https://github.com/NagyDonat commented:

I reviewed the code changes within this commit, and overall I'm very grateful for this contribution, because it overcomes lots of technical challenges to introduce a promising heuristic.

As this code is unavoidable complex, I think it's especially important to make it _as readable as possible_, so I added several suggestions that try to improve the code quality. I understand that you are probably a bit tired after implementing this impressive commit (and getting through suggestions from other reviewers), so I'm sorry for piling on these additional suggestions. If you feel that some of them are unreasonable, feel free to "push back" -- I'll try to be flexible.

So far I only read the changes in `MallocChecker.cpp`, but I'll also review the tests soon.

Unfortunately I didn't have time to look at the resolved discussion by other reviewers, I'm very sorry if I'm revisiting some topic that was already discussed there.

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


More information about the cfe-commits mailing list