@@ -143,20 +143,30 @@ private module StepsInput implements Impl::Private::StepsInputSig {
143
143
result .asCallBaseExprCfgNode ( ) .getCallExprBase ( ) = sc .( LibraryCallable ) .getACall ( )
144
144
}
145
145
146
+ private Expr getArg ( CallExprBase call , ParameterPosition pos ) {
147
+ result = call .getArgList ( ) .getArg ( pos .getPosition ( ) )
148
+ or
149
+ result = call .( MethodCallExpr ) .getReceiver ( ) and pos .isSelf ( )
150
+ }
151
+
146
152
RustDataFlow:: Node getSourceNode ( Input:: SourceBase source , Impl:: Private:: SummaryComponent sc ) {
147
153
sc = Impl:: Private:: SummaryComponent:: return ( _) and
148
154
result .asExpr ( ) .getExpr ( ) = source .getCall ( )
155
+ or
156
+ exists ( CallExprBase call , Expr arg , ParameterPosition pos |
157
+ result .( RustDataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( ) .getExpr ( ) = arg and
158
+ sc = Impl:: Private:: SummaryComponent:: argument ( pos ) and
159
+ call = source .getCall ( ) and
160
+ arg = getArg ( call , pos )
161
+ )
149
162
}
150
163
151
164
RustDataFlow:: Node getSinkNode ( Input:: SinkBase sink , Impl:: Private:: SummaryComponent sc ) {
152
165
exists ( CallExprBase call , Expr arg , ParameterPosition pos |
153
166
result .asExpr ( ) .getExpr ( ) = arg and
154
167
sc = Impl:: Private:: SummaryComponent:: argument ( pos ) and
155
- call = sink .getCall ( )
156
- |
157
- arg = call .getArgList ( ) .getArg ( pos .getPosition ( ) )
158
- or
159
- arg = call .( MethodCallExpr ) .getReceiver ( ) and pos .isSelf ( )
168
+ call = sink .getCall ( ) and
169
+ arg = getArg ( call , pos )
160
170
)
161
171
}
162
172
}
0 commit comments