CodeQL library for C/C++
Search

Member predicate FunctionInput::isReturnValueDeref

Holds if this is the input value pointed to by the return value of a function, if the function returns a pointer, or the input value referred to by the return value of a function, if the function returns a reference.

Example:

char* getPointer();
float& getReference();
int getInt();
  • isReturnValueDeref() holds for the FunctionInput that represents the value of *getPointer() (with type char).
  • isReturnValueDeref() holds for the FunctionInput that represents the value of getReference() (with type float).
  • There is no FunctionInput of getInt() for which isReturnValueDeref() holds because the return type of getInt() is neither a pointer nor a reference.

Note that data flows in through function return values are relatively rare, but they do occur when a function returns a reference to itself, part of itself, or one of its other inputs.

predicate isReturnValueDeref()