@@ -46,6 +46,7 @@ private newtype TIRDataFlowNode =
46
46
Ssa:: isModifiableByCall ( operand , indirectionIndex )
47
47
} or
48
48
TSsaPhiNode ( Ssa:: PhiNode phi ) or
49
+ TSsaIteratorNode ( IteratorFlow:: IteratorFlowNode n ) or
49
50
TRawIndirectOperand0 ( Node0Impl node , int indirectionIndex ) {
50
51
Ssa:: hasRawIndirectOperand ( node .asOperand ( ) , indirectionIndex )
51
52
} or
@@ -653,6 +654,30 @@ class SsaPhiNode extends Node, TSsaPhiNode {
653
654
predicate isPhiRead ( ) { phi .isPhiRead ( ) }
654
655
}
655
656
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
+
656
681
/**
657
682
* INTERNAL: do not use.
658
683
*
@@ -2151,6 +2176,8 @@ private module Cached {
2151
2176
// Def-use/Use-use flow
2152
2177
Ssa:: ssaFlow ( nodeFrom , nodeTo )
2153
2178
or
2179
+ IteratorFlow:: localFlowStep ( nodeFrom , nodeTo )
2180
+ or
2154
2181
// Operand -> Instruction flow
2155
2182
simpleInstructionLocalFlowStep ( nodeFrom .asOperand ( ) , nodeTo .asInstruction ( ) )
2156
2183
or
0 commit comments