@@ -17,16 +17,6 @@ private module CaptureInput implements Shared::InputSig<Location> {
17
17
ExprCfgNode ( ) { isExpressionNode ( this ) }
18
18
}
19
19
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
-
30
20
class Callable extends Scope {
31
21
predicate isConstructor ( ) { none ( ) }
32
22
}
@@ -95,6 +85,16 @@ private module CaptureInput implements Shared::InputSig<Location> {
95
85
CapturedVariable getVariable ( ) { result = v }
96
86
}
97
87
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
+
98
98
class ClosureExpr extends Expr {
99
99
ClosureExpr ( ) {
100
100
this .getNode ( ) instanceof CallableExpr
0 commit comments