@@ -17,16 +17,6 @@ private module CaptureInput implements Shared::InputSig<Location> {
1717 ExprCfgNode ( ) { isExpressionNode ( this ) }
1818 }
1919
20- private predicate closureFlowStep ( ExprCfgNode nodeFrom , ExprCfgNode nodeTo ) {
21- // TODO: Other languages have an extra case here looking like
22- // simpleAstFlowStep(nodeFrom, nodeTo)
23- // we should investigate the potential benefit of adding that.
24- exists ( SsaVariable def |
25- def .getAUse ( ) = nodeTo and
26- def .getAnUltimateDefinition ( ) .getDefinition ( ) .( DefinitionNode ) .getValue ( ) = nodeFrom
27- )
28- }
29-
3020 class Callable extends Scope {
3121 predicate isConstructor ( ) { none ( ) }
3222 }
@@ -95,6 +85,16 @@ private module CaptureInput implements Shared::InputSig<Location> {
9585 CapturedVariable getVariable ( ) { result = v }
9686 }
9787
88+ private predicate closureFlowStep ( ExprCfgNode nodeFrom , ExprCfgNode nodeTo ) {
89+ // TODO: Other languages have an extra case here looking like
90+ // simpleAstFlowStep(nodeFrom, nodeTo)
91+ // we should investigate the potential benefit of adding that.
92+ exists ( SsaVariable def |
93+ def .getAUse ( ) = nodeTo and
94+ def .getAnUltimateDefinition ( ) .getDefinition ( ) .( DefinitionNode ) .getValue ( ) = nodeFrom
95+ )
96+ }
97+
9898 class ClosureExpr extends Expr {
9999 ClosureExpr ( ) {
100100 this .getNode ( ) instanceof CallableExpr
0 commit comments