[PATCH] D49361: [analyzer] Detect pointers escaped after return statement execution in MallocChecker
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 25 15:54:33 PDT 2018
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Yup, tests for temporaries are great to have as well.
================
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2475-2477
// Check if we are returning freed memory.
if (Sym)
checkUseAfterFree(Sym, C, E);
----------------
The old code makes the warning appear slightly earlier, so we still need it, even if duplicated. Let's comment about that and maybe de-duplicate?
https://reviews.llvm.org/D49361
More information about the cfe-commits
mailing list