[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments

Daniel Marjamäki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 23:11:31 PDT 2017


danielmarjamaki added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:788
 
+SVal MallocChecker::SValBinMulOp(CheckerContext &C, const Expr *Blocks,
+                                 const Expr *BlockBytes, ProgramStateRef State) {
----------------
danielmarjamaki wrote:
> I have the feeling this should be renamed. Since its purpose is to calculate the total size maybe MallocChecker::calculateBufferSize()
please respond to comments by clicking on the "Reply" button for the comment. So your responce will be shown near my comment.

yes it can be hard to figure out a good name.

alright, you didn't like my suggestion then let's skip that.

do you need to start the name with "sval". does that indicate that a "sval" is returned? then that would be unusual imho.

I guess I don't have a strong opinion but I would also remove "Bin". The "Mul" says that imho.

how about evalMulForBufferSize?



Repository:
  rL LLVM

https://reviews.llvm.org/D30771





More information about the cfe-commits mailing list