mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
C++: Use the new predicates for uniform treatment of parameters and qualifiers in model dataflow.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user