Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 22202af

Browse files
authored
Merge pull request #12007 from MathiasVP/fix-is-chi-before-iterator-use
C++: Add missing condition to `isChiBeforeIteratorUse`
2 parents 9573395 + 587b4fe commit 22202af

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ private module Cached {
538538
numberOfLoads >= 0 and
539539
isUse(_, iteratorDerefAddress, iteratorBase, numberOfLoads + 2, 0) and
540540
iteratorBase.getResultType() instanceof Interfaces::Iterator and
541+
load.getSourceAddressOperand() = iteratorDerefAddress and
541542
read.getPrimaryInstruction() = load.getSourceAddress() and
542543
memory = read.getSideEffectOperand().getAnyDef()
543544
)

0 commit comments

Comments
 (0)