Skip to content

Commit 7fb43a5

Browse files
committed
C++ IR: getAnyDef -> getDef in RangeUtils.qll
As recommended by Dave in PR review.
1 parent c831c4b commit 7fb43a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cpp/ql/src/semmle/code/cpp/rangeanalysis/RangeUtils.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ predicate valueFlowStep(Instruction i, Operand op, int delta) {
4242
i.(SubInstruction).getLeftOperand() = op and
4343
i.(SubInstruction).getRightOperand() = x
4444
|
45-
delta = -getValue(getConstantValue(x.getAnyDef()))
45+
delta = -getValue(getConstantValue(x.getDef()))
4646
)
4747
or
4848
exists(Operand x |
@@ -51,15 +51,15 @@ predicate valueFlowStep(Instruction i, Operand op, int delta) {
5151
op != x
5252
|
5353
delta = i.(PointerAddInstruction).getElementSize() *
54-
getValue(getConstantValue(x.getAnyDef()))
54+
getValue(getConstantValue(x.getDef()))
5555
)
5656
or
5757
exists(Operand x |
5858
i.(PointerSubInstruction).getLeftOperand() = op and
5959
i.(PointerSubInstruction).getRightOperand() = x
6060
|
6161
delta = i.(PointerSubInstruction).getElementSize() *
62-
-getValue(getConstantValue(x.getAnyDef()))
62+
-getValue(getConstantValue(x.getDef()))
6363
)
6464
}
6565

0 commit comments

Comments
 (0)