CodeQL library for C/C++
Search

Member predicate SsaDefinition::getDefiningValue

Gets the expression assigned to the SSA variable (this, v), if any, when it is not a phi definition. The following is an exhaustive list of expressions that may be the result of this predicate.

  • The contained expression of an Initializer.
  • The right-hand side of an AssignExpr.
  • An AssignOperation.
  • A CrementOperation.

In all cases except PostfixCrementOperation, the variable v will be equal to the result of this predicate after evaluation of this.getDefinition().

If the SSA variable is defined in other ways than those four (such as function parameters or f(&x)) there is no result. These cases are instead covered via definedByParameter and getDefinition, respectively.

Expr getDefiningValue(StackVariable v)