CodeQL library for C/C++
codeql/cpp-all 2.0.2-dev (changelog, source)
Search

Member predicate OutParameterDeref::isParameterDeref

Holds if this is the output value pointed to by a pointer parameter (through ind number of indirections) to a function, or the output value referred to by a reference parameter to a function, where the parameter has index index.

Example:

void func(int n, char* p, float& r);
  • isParameterDeref(1, 1) holds for the FunctionOutput that represents the value of *p (with type char) on return from the function.
  • isParameterDeref(2, 1) holds for the FunctionOutput that represents the value of r (with type float) on return from the function.
  • There is no FunctionOutput for which isParameterDeref(0, _) holds, because n is neither a pointer nor a reference.
predicate isParameterDeref(ParameterIndex i, int ind)