@@ -46,6 +46,7 @@ private newtype TIRDataFlowNode =
4646 Ssa:: isModifiableByCall ( operand , indirectionIndex )
4747 } or
4848 TSsaPhiNode ( Ssa:: PhiNode phi ) or
49+ TSsaIteratorNode ( IteratorFlow:: IteratorFlowNode n ) or
4950 TRawIndirectOperand0 ( Node0Impl node , int indirectionIndex ) {
5051 Ssa:: hasRawIndirectOperand ( node .asOperand ( ) , indirectionIndex )
5152 } or
@@ -653,6 +654,30 @@ class SsaPhiNode extends Node, TSsaPhiNode {
653654 predicate isPhiRead ( ) { phi .isPhiRead ( ) }
654655}
655656
657+ /**
658+ * INTERNAL: do not use.
659+ *
660+ * Dataflow nodes necessary for iterator flow
661+ */
662+ class SsaIteratorNode extends Node , TSsaIteratorNode {
663+ IteratorFlow:: IteratorFlowNode node ;
664+
665+ SsaIteratorNode ( ) { this = TSsaIteratorNode ( node ) }
666+
667+ /** Gets the phi node associated with this node. */
668+ IteratorFlow:: IteratorFlowNode getIteratorFlowNode ( ) { result = node }
669+
670+ override Declaration getEnclosingCallable ( ) { result = this .getFunction ( ) }
671+
672+ override Declaration getFunction ( ) { result = node .getFunction ( ) }
673+
674+ override DataFlowType getType ( ) { result = node .getType ( ) }
675+
676+ final override Location getLocationImpl ( ) { result = node .getLocation ( ) }
677+
678+ override string toStringImpl ( ) { result = node .toString ( ) }
679+ }
680+
656681/**
657682 * INTERNAL: do not use.
658683 *
@@ -2151,6 +2176,8 @@ private module Cached {
21512176 // Def-use/Use-use flow
21522177 Ssa:: ssaFlow ( nodeFrom , nodeTo )
21532178 or
2179+ IteratorFlow:: localFlowStep ( nodeFrom , nodeTo )
2180+ or
21542181 // Operand -> Instruction flow
21552182 simpleInstructionLocalFlowStep ( nodeFrom .asOperand ( ) , nodeTo .asInstruction ( ) )
21562183 or
0 commit comments