================
@@ -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},
----------------
balazske wrote:

In the C library documentations it has only 3 parameters. I think it is 
unlikely that a function has changed parameter count in a newer C version 
(instead of a new function with different name).

https://github.com/llvm/llvm-project/pull/173854
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to