@@ -34,15 +34,15 @@ abstract class NodeImpl extends Node {
34
34
}
35
35
36
36
private class ExprNodeImpl extends ExprNode , NodeImpl {
37
- override CfgScope getCfgScope ( ) { none ( ) /* TODO */ }
37
+ override CfgScope getCfgScope ( ) { result = this . getExprNode ( ) . getExpr ( ) . getEnclosingScope ( ) }
38
38
39
39
override Location getLocationImpl ( ) { result = this .getExprNode ( ) .getLocation ( ) }
40
40
41
41
override string toStringImpl ( ) { result = this .getExprNode ( ) .toString ( ) }
42
42
}
43
43
44
44
private class StmtNodeImpl extends StmtNode , NodeImpl {
45
- override CfgScope getCfgScope ( ) { none ( ) /* TODO */ }
45
+ override CfgScope getCfgScope ( ) { result = this . getStmtNode ( ) . getStmt ( ) . getEnclosingScope ( ) }
46
46
47
47
override Location getLocationImpl ( ) { result = this .getStmtNode ( ) .getLocation ( ) }
48
48
@@ -69,7 +69,9 @@ module SsaFlow {
69
69
Impl:: Node asNode ( Node n ) {
70
70
n = TSsaNode ( result )
71
71
or
72
- result .( Impl:: ExprNode ) .getExpr ( ) = n .asExpr ( ) // TODO: Statement nodes?
72
+ result .( Impl:: ExprNode ) .getExpr ( ) = n .asExpr ( )
73
+ or
74
+ result .( Impl:: ExprNode ) .getExpr ( ) = n .asStmt ( )
73
75
or
74
76
result .( Impl:: ExprPostUpdateNode ) .getExpr ( ) = n .( PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( )
75
77
or
@@ -371,7 +373,8 @@ private module ParameterNodes {
371
373
override Parameter getParameter ( ) { result = parameter }
372
374
373
375
override predicate isParameterOf ( DataFlowCallable c , ParameterPosition pos ) {
374
- exists ( CfgScope callable | callable = c .asCfgScope ( ) |
376
+ parameter .getDeclaringScope ( ) = c .asCfgScope ( ) and
377
+ (
375
378
pos .isKeyword ( parameter .getName ( ) )
376
379
or
377
380
// Given a function f with parameters x, y we map
0 commit comments