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

Member predicate FunctionInput::isParameterDeref

Holds if this is the input value pointed to (through ind number of indirections) by a pointer parameter to a function, or the input 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 FunctionInput that represents the value of *p (with type char) on entry to the function.
  • isParameterDeref(2, 1) holds for the FunctionInput that represents the value of r (with type float) on entry to the function.
  • There is no FunctionInput for which isParameterDeref(0, _) holds, because n is neither a pointer nor a reference.
predicate isParameterDeref(ParameterIndex index, int ind)