danielmarjamaki added a comment. Thanks! Looks like a valueable addition.
================ Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2004 +void CStringChecker::evalMemset(CheckerContext &C, const CallExpr *CE) const { + if (CE->getNumArgs() < 3) + return; ---------------- even better: != 3 ================ Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2009 + + const Expr *S = CE->getArg(0); + const Expr *Size = CE->getArg(2); ---------------- The name "S" does not tell me much.. how about something like Data / DataArg / PtrArg / ..? ================ Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2011 + const Expr *Size = CE->getArg(2); + ProgramStateRef state = C.getState(); + ---------------- Variables should start with capital.. State, SizeVal, SizeTy, ... ================ Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2034 + // If the size can be nonzero, we have to check the other arguments. + if (stateNonZeroSize) { + state = stateNonZeroSize; ---------------- use early return: if (!stateNonZeroSize) return; Repository: rL LLVM https://reviews.llvm.org/D31868 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits