================
@@ -127,10 +128,35 @@ class CallAndMessageChecker
ProgramStateRef state,
const ObjCMethodCall &msg) const;
- bool uninitRefOrPointer(CheckerContext &C, SVal V, SourceRange ArgRange,
- const Expr *ArgEx, const BugType &BT,
- const ParmVarDecl *ParamDecl,
+ bool uninitRefOrPointer(CheckerContext &C, SVal V, const CallEvent &Call,
+ const BugType &BT, const ParmVarDecl *ParamDecl,
int ArgumentNumber) const;
+
+ // C library functions which have a pointer-to-struct parameter that should
be
+ // initialized (at least partially) before the call. The 'uninitRefOrPointer'
+ // check uses this data.
+ CallDescriptionMap<int> FunctionsWithInOutPtrParam = {
+ {{CDM::CLibrary, {"mbrlen"}, 3}, 2},
----------------
steakhal wrote:
mbrlen can either have 3 or 4 parameters depending on the C version, right?
https://github.com/llvm/llvm-project/pull/173854
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits