@@ -34,15 +34,15 @@ abstract class NodeImpl extends Node {
3434}
3535
3636private class ExprNodeImpl extends ExprNode , NodeImpl {
37- override CfgScope getCfgScope ( ) { none ( ) /* TODO */ }
37+ override CfgScope getCfgScope ( ) { result = this . getExprNode ( ) . getExpr ( ) . getEnclosingScope ( ) }
3838
3939 override Location getLocationImpl ( ) { result = this .getExprNode ( ) .getLocation ( ) }
4040
4141 override string toStringImpl ( ) { result = this .getExprNode ( ) .toString ( ) }
4242}
4343
4444private class StmtNodeImpl extends StmtNode , NodeImpl {
45- override CfgScope getCfgScope ( ) { none ( ) /* TODO */ }
45+ override CfgScope getCfgScope ( ) { result = this . getStmtNode ( ) . getStmt ( ) . getEnclosingScope ( ) }
4646
4747 override Location getLocationImpl ( ) { result = this .getStmtNode ( ) .getLocation ( ) }
4848
@@ -69,7 +69,9 @@ module SsaFlow {
6969 Impl:: Node asNode ( Node n ) {
7070 n = TSsaNode ( result )
7171 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 ( )
7375 or
7476 result .( Impl:: ExprPostUpdateNode ) .getExpr ( ) = n .( PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( )
7577 or
@@ -371,7 +373,8 @@ private module ParameterNodes {
371373 override Parameter getParameter ( ) { result = parameter }
372374
373375 override predicate isParameterOf ( DataFlowCallable c , ParameterPosition pos ) {
374- exists ( CfgScope callable | callable = c .asCfgScope ( ) |
376+ parameter .getDeclaringScope ( ) = c .asCfgScope ( ) and
377+ (
375378 pos .isKeyword ( parameter .getName ( ) )
376379 or
377380 // Given a function f with parameters x, y we map
0 commit comments