C++: Use the new predicates for uniform treatment of parameters and qualifiers in model dataflow.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-01-28 13:33:08 +01:00
parent 1068edeb28
commit 5a420f2bae

View File

@@ -887,21 +887,15 @@ private predicate modelFlow(Operand opFrom, Instruction iTo) {
iTo = call
or
exists(int index, WriteSideEffectInstruction outNode |
modelOut.isParameterDeref(index) and
modelOut.isParameterDerefOrQualifierObject(index) and
iTo = outNode and
outNode = getSideEffectFor(call, index)
)
or
exists(WriteSideEffectInstruction outNode |
modelOut.isQualifierObject() and
iTo = outNode and
outNode = getSideEffectFor(call, -1)
)
) and
(
exists(int index |
modelIn.isParameter(index) and
opFrom = call.getPositionalArgumentOperand(index)
modelIn.isParameterOrQualifierAddress(index) and
opFrom = call.getArgumentOperand(index)
)
or
exists(int index, ReadSideEffectInstruction read |
@@ -910,9 +904,6 @@ private predicate modelFlow(Operand opFrom, Instruction iTo) {
opFrom = read.getSideEffectOperand()
)
or
modelIn.isQualifierAddress() and
opFrom = call.getThisArgumentOperand()
or
exists(ReadSideEffectInstruction read |
modelIn.isQualifierObject() and
read = getSideEffectFor(call, -1) and