This revision was automatically updated to reflect the committed changes.
Closed by commit rL338780: [analyzer] Detect pointers escaped after ReturnStmt
execution in MallocChecker. (authored by rkovacs, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
NoQ accepted this revision.
NoQ added a comment.
All this stuff looks great! Please commit.
https://reviews.llvm.org/D49361
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rnkovacs updated this revision to Diff 158681.
rnkovacs marked an inline comment as done.
rnkovacs added a comment.
Add helper function to be used in both callbacks.
https://reviews.llvm.org/D49361
Files:
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
test/Analysis/inner-pointer.cpp
NoQ added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2488
+
+ checkPreStmt(S, C);
+}
Let's do a common sub-function, similarly to how
`MallocChecker::checkPointerEscape` and
`MallocChecker::checkConstPointerEscape` both call
rnkovacs updated this revision to Diff 157966.
rnkovacs marked an inline comment as done.
rnkovacs added a comment.
De-duplicate & add comment.
https://reviews.llvm.org/D49361
Files:
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
test/Analysis/inner-pointer.cpp
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)
rnkovacs updated this revision to Diff 157375.
rnkovacs retitled this revision from "[analyzer][WIP] Detect pointers escaped
after return statement execution in MallocChecker" to "[analyzer] Detect
pointers escaped after return statement execution in MallocChecker".
rnkovacs edited the summary