@@ -72,15 +72,12 @@ predicate returnStep(DataFlowPrivate::ReturnNode nodeFrom, Node nodeTo) {
7272 */
7373predicate basicStoreStep ( Node nodeFrom , LocalSourceNode nodeTo , string content ) {
7474 // TODO: support SetterMethodCall inside TuplePattern
75- exists (
76- ExprNodes:: AssignmentCfgNode assignment , ExprNodes:: CallCfgNode call ,
77- DataFlowPublic:: ExprNode receiver
78- |
75+ exists ( ExprNodes:: AssignmentCfgNode assignment , ExprNodes:: CallCfgNode call |
7976 assignment .getLhs ( ) = call and
8077 content = getSetterCallAttributeName ( call .getExpr ( ) ) and
81- receiver . getExprNode ( ) . getNode ( ) = call . getExpr ( ) . ( AST :: SetterMethodCall ) .getReceiver ( ) and
82- assignment . getRhs ( ) = nodeFrom . ( DataFlowPublic :: ExprNode ) . getExprNode ( ) and
83- nodeTo = receiver
78+ nodeTo . ( DataFlowPublic :: ExprNode ) . getExprNode ( ) = call .getReceiver ( ) and
79+ call . getExpr ( ) instanceof AST :: SetterMethodCall and
80+ assignment . getRhs ( ) = nodeFrom . ( DataFlowPublic :: ExprNode ) . getExprNode ( )
8481 )
8582}
8683
@@ -105,10 +102,10 @@ private string getSetterCallAttributeName(AST::SetterMethodCall call) {
105102 * Holds if `nodeTo` is the result of accessing the `content` content of `nodeFrom`.
106103 */
107104predicate basicLoadStep ( Node nodeFrom , Node nodeTo , string content ) {
108- exists ( ExprNodes:: CallCfgNode call |
105+ exists ( ExprNodes:: MethodCallCfgNode call |
109106 call .getExpr ( ) .getNumberOfArguments ( ) = 0 and
110107 content = call .getExpr ( ) .( AST:: MethodCall ) .getMethodName ( ) and
111- nodeFrom .asExpr ( ) . getNode ( ) = call . getExpr ( ) . ( AST :: MethodCall ) .getReceiver ( ) and
108+ nodeFrom .asExpr ( ) = call .getReceiver ( ) and
112109 nodeTo .asExpr ( ) = call
113110 )
114111}
0 commit comments