dcoughlin added a comment.
Thanks Malhar! Committed in r311063.
Repository:
rL LLVM
https://reviews.llvm.org/D36441
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL311063: [analyzer] Add support for reference counting of
parameters on the callee side (authored by dcoughlin).
Changed prior to commit:
https://reviews.llvm.org/D36441?vs=111420=111463#toc
malhar1995 updated this revision to Diff 111420.
malhar1995 added a comment.
This patch adds the functionality of performing reference counting on the
callee side for Integer Set Library (ISL) to Clang Static Analyzer's
RetainCountChecker.
Reference counting on the callee side can be
dcoughlin added a comment.
Thanks! This looks good to me, with the note about factoring out the duplicated
logic addressed, Would you factor out that logic into a static function and
update phabricator summary to be a commit message. Then I will commit!
Comment at:
malhar1995 updated this revision to Diff 110514.
malhar1995 marked 7 inline comments as done.
malhar1995 added a comment.
Addressed comments.
P.S: I'm yet to test this callee-side parameter checking functionality on the
actual ISL codebase. I'll do that ASAP.
Repository:
rL LLVM
dcoughlin added a comment.
Nice work! This looks good, with some nits and testing comments inline. Have
you run this on real code? What kind of false positives do you see?
Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:1853
+
+void
dcoughlin added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3960-3971
+ for (unsigned idx = 0, e = FD->getNumParams(); idx != e; ++idx) {
+const ParmVarDecl *Param = FD->getParamDecl(idx);
+SymbolRef Sym =
malhar1995 added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:2521-2523
+ deriveAllocLocation(Ctx, sym);
+ if (!AllocBinding)
+deriveParamLocation(Ctx, sym);
I'm not sure what difference it will make if I change the
malhar1995 created this revision.
Herald added a subscriber: eraman.
Current RetainCountChecker performs reference counting of function
arguments/parameters only on the caller side and not on the callee side.
This patch aims to add support for reference counting on the callee-side for
objects