mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
C++: Fix range analysis for new API
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user