[clang] [clang][analyzer doc] Add basic description of checker 'core.CallAndMessage' (NFC). (PR #177179)

Donát Nagy via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 22 05:02:30 PST 2026


================
@@ -83,7 +83,48 @@ Ensure the shift operands are in proper range before shifting.
 
 core.CallAndMessage (C, C++, ObjC)
 """"""""""""""""""""""""""""""""""
- Check for logical errors for function calls and Objective-C message expressions (e.g., uninitialized arguments, null function pointers).
+Check for logical errors for function calls and Objective-C message expressions
+(e.g., uninitialized arguments, null function pointers).
+
+This checker is a collection of related checks that can be turned on or off by
+checker options.
+
+* **FunctionPointer** Check for null or undefined function pointer at function
+  call.
+* **CXXThisMethodCall** Check for null or undefined ``this`` pointer at method
+  call.
+* **CXXDeallocationArg** Check for null or undefined argument of
+  ``operator delete``.
+* **ArgInitializedness** Check for undefined pass-by-value function arguments.
+* **ArgPointeeInitializedness** Check for undefined pass-by-reference (pointer
+  to constant value or constant reference) function arguments. In special cases
+  non-constant arguments are checked. This happens for C library functions where
+  it is required to initialize (at least partially) a passed structure which
+  is used for both input and output (for example last argument of ``mktime`` or
+  ``mbrlen``).
+* **ParameterCount** Check for correct number of passed arguments to functions
+  or ObjC blocks. This will warn if the actual argument count is less than the
+  required count (by the declaration).
----------------
NagyDonat wrote:

Does this report calls that specify _more_ arguments than the number of parameters in the declaration? Either way, it would be nice to mention this.

(Of course, I'm not speaking about variadic functions – those can freely have more arguments.)

https://github.com/llvm/llvm-project/pull/177179


More information about the cfe-commits mailing list