C++: Fix range analysis for new API

This commit is contained in:
Dave Bartolomeo
2019-02-12 09:38:11 -08:00
parent c224bbd767
commit f5121d71bc
4 changed files with 6 additions and 4 deletions

View File

@@ -379,7 +379,7 @@ private predicate boundedNonPhiOperand(NonPhiOperand op, Bound b, int delta, boo
private predicate boundFlowStepPhi(
PhiOperand op2, Operand op1, int delta, boolean upper, Reason reason
) {
op2.getDefinitionInstruction().getAnOperand().(CopySourceOperand) = op1 and
op2.getDefinitionInstruction().(CopyInstruction).getSourceValueOperand() = op1 and
(upper = true or upper = false) and
reason = TNoReason() and
delta = 0

View File

@@ -28,7 +28,7 @@ IntValue getConstantValue(Instruction instr) {
}
predicate valueFlowStep(Instruction i, Operand op, int delta) {
i.getAnOperand().(CopySourceOperand) = op and delta = 0
i.(CopyInstruction).getSourceValueOperand() = op and delta = 0
or
exists(Operand x |
i.(AddInstruction).getAnOperand() = op and

View File

@@ -398,7 +398,7 @@ cached module SignAnalysisCached {
result = castSign(operandSign(ci.getAnOperand()), fromSigned, toSigned, getCastKind(ci))
)
or
result = operandSign(i.getAnOperand().(CopySourceOperand))
result = operandSign(i.(CopyInstruction).getSourceValueOperand())
or
result = operandSign(i.(BitComplementInstruction).getAnOperand()).bitnot()
or