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

Class InReturnValueDeref

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();
  • InReturnValueDeref represents the value of *getPointer() (with type char).
  • InReturnValueDeref represents the value of getReference() (with type float).
  • InReturnValueDeref does not represent the return value of getInt() 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.

Import path

import cpp

Direct supertypes

Indirect supertypes

Predicates

getIndirectionInput

INTERNAL: Do not use.

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.

toString

Inherited predicates

isParameter

Holds if this is the input value of the parameter with index index.

from FunctionInput
isParameterDeref

Holds if this is the input value pointed to 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.

from 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.

from FunctionInput
isParameterDerefOrQualifierObject

Holds if i >= 0 and isParameterDeref(i) holds for this value, or if i = -1 and isQualifierObject() holds for this value.

from FunctionInput
isParameterDerefOrQualifierObject

Holds if i >= 0 and isParameterDeref(i, ind) holds for this value, or if i = -1 and isQualifierObject(ind) holds for this value.

from FunctionInput
isParameterOrQualifierAddress

Holds if i >= 0 and isParameter(i) holds for this value, or if i = -1 and isQualifierAddress() holds for this value.

from FunctionInput
isQualifierAddress

Holds if this is the input value of the this pointer of an instance member function.

from FunctionInput
isQualifierObject

Holds if this is the input value pointed to by the this pointer of an instance member function.

from FunctionInput
isQualifierObject

Holds if this is the input value pointed to by the this pointer of an instance member function.

from 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.

from FunctionInput