C++: Use new predicate and accept test changes.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-03-04 16:05:38 +01:00
parent 8a4cc3b5c2
commit 6c14288fa7
3 changed files with 8 additions and 25 deletions

View File

@@ -693,7 +693,11 @@ private predicate simpleInstructionLocalFlowStep(Operand opFrom, Instruction iTo
exists(ChiInstruction chi | chi = iTo |
opFrom.getAnyDef() instanceof WriteSideEffectInstruction and
chi.getPartialOperand() = opFrom and
not chi.isResultConflated()
not chi.isResultConflated() and
// In a call such as `set_value(&x->val);`
// we don't want the memory that of `x` to receive dataflow. This is handled by field flow. If we
// add dataflow here we get field to object flow.
not chi.isPartialUpdate()
)
or
// Flow through modeled functions