[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments
Leslie Zhai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 20 02:38:27 PDT 2017
xiangzhai added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:337
+ const Expr *BlockBytes,
+ ProgramStateRef State);
static ProgramStateRef CallocMem(CheckerContext &C, const CallExpr *CE,
----------------
danielmarjamaki wrote:
> Thanks for renaming the function I am happy now with that name. :-)
>
> hmm.. if you have CheckerContext parameter already then ProgramStateRef parameter seems redundant. You should be able to use C.getState().
>
> However looking at surrounding code it seems you can provide ProgramStateRef for consistency.
>
> I don't have a strong opinion, but I would remove this State.
>
I will update it tomorrow! I have to gotta home to look after my kid :)
Repository:
rL LLVM
https://reviews.llvm.org/D30771
More information about the cfe-commits
mailing list