Predicate Cached::asDefinitionImpl
Gets the expression that represents the result of StoreInstruction
for
dataflow purposes.
For example, consider the following example
int x = 42; // 1
x = 34; // 2
++x; // 3
x++; // 4
x += 1; // 5
int y = x += 2; // 6
For (1) the result is 42
.
For (2) the result is x = 34
.
For (3) the result is ++x
.
For (4) the result is x++
.
For (5) the result is x += 1
.
For (6) there are two results:
- For the
StoreInstruction
generated byx += 2
the result isx += 2
- For the
StoreInstruction
generated byint y = ...
the result is alsox += 2
Import path
import semmle.code.cpp.ir.dataflow.internal.ExprNodes
Expr asDefinitionImpl(StoreInstruction store)