Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Co-authored-by: Jonas Jensen <jbj@github.com>
This commit is contained in:
Mathias Vorreiter Pedersen
2020-09-21 09:31:30 +02:00
committed by GitHub
parent 53da751b15
commit 6dd7675a97

View File

@@ -220,8 +220,8 @@ pragma[noinline]
private predicate getWrittenField(Instruction instr, Field f, Class c) {
exists(FieldAddressInstruction fa |
fa =
getFieldInstruction([any(StoreInstruction store | instr = store).getDestinationAddress(),
any(WriteSideEffectInstruction write | instr = write).getDestinationAddress()]) and
getFieldInstruction([instr.(StoreInstruction).getDestinationAddress(),
instr.(WriteSideEffectInstruction).getDestinationAddress()]) and
f = fa.getField() and
c = f.getDeclaringType()
)