C++/C#: Sync identical files

This commit is contained in:
Mathias Vorreiter Pedersen
2020-06-26 09:08:44 +02:00
parent 3af679e83d
commit 63752dddef
2 changed files with 12 additions and 10 deletions

View File

@@ -196,16 +196,17 @@ private predicate operandReturned(Operand operand, IntValue bitOffset) {
bitOffset = Ints::unknown()
}
private predicate isArgumentForParameter(CallInstruction ci, Operand operand, Instruction init) {
private predicate isArgumentForParameter(
CallInstruction ci, Operand operand, InitializeParameterInstruction init
) {
exists(Language::Function f |
ci = operand.getUse() and
f = ci.getStaticCallTarget() and
(
init.(InitializeParameterInstruction).getParameter() =
f.getParameter(operand.(PositionalArgumentOperand).getIndex())
init.getParameter() = f.getParameter(operand.(PositionalArgumentOperand).getIndex())
or
init.(InitializeParameterInstruction).getIRVariable() instanceof IRThisVariable and
init.getEnclosingFunction() = f and
init.getIRVariable() instanceof IRThisVariable and
unique( | | init.getEnclosingFunction()) = f and
operand instanceof ThisArgumentOperand
) and
not Language::isFunctionVirtual(f) and