C++: Add missing condition to 'isChiBeforeIteratorUse'.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-01-27 14:04:01 +00:00
parent bfe9ae22ad
commit 587b4fee9d

View File

@@ -538,6 +538,7 @@ private module Cached {
numberOfLoads >= 0 and
isUse(_, iteratorDerefAddress, iteratorBase, numberOfLoads + 2, 0) and
iteratorBase.getResultType() instanceof Interfaces::Iterator and
load.getSourceAddressOperand() = iteratorDerefAddress and
read.getPrimaryInstruction() = load.getSourceAddress() and
memory = read.getSideEffectOperand().getAnyDef()
)