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

Member predicate OutReturnValueDeref::isReturnValueDeref

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

Example:

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