@@ -143,7 +143,7 @@ module Input implements InputSig<Location, RustDataFlow> {
143143
144144private import Make< Location , RustDataFlow , Input > as Impl
145145
146- private module StepsInput implements Impl:: Private:: StepsInputSig {
146+ module StepsInput implements Impl:: Private:: StepsInputSig {
147147 DataFlowCall getACall ( Public:: SummarizedCallable sc ) { result .asCall ( ) .getStaticTarget ( ) = sc }
148148
149149 /** Gets the argument of `source` described by `sc`, if any. */
@@ -171,18 +171,27 @@ private module StepsInput implements Impl::Private::StepsInputSig {
171171 result .asCfgScope ( ) = source .getEnclosingCfgScope ( )
172172 }
173173
174- RustDataFlow:: Node getSourceNode ( Input:: SourceBase source , Impl:: Private:: SummaryComponentStack s ) {
174+ additional RustDataFlow:: Node getSourceNode (
175+ Input:: SourceBase source , Impl:: Private:: SummaryComponentStack s , boolean isArgPostUpdate
176+ ) {
175177 s .head ( ) = Impl:: Private:: SummaryComponent:: return ( _) and
176- result .asExpr ( ) = source .getCall ( )
178+ result .asExpr ( ) = source .getCall ( ) and
179+ isArgPostUpdate = false
177180 or
178181 exists ( RustDataFlow:: ArgumentPosition pos , Expr arg |
179182 s .head ( ) = Impl:: Private:: SummaryComponent:: parameter ( pos ) and
180183 arg = getSourceNodeArgument ( source , s .tail ( ) .headOfSingleton ( ) ) and
181- result .asParameter ( ) = getCallable ( arg ) .getParam ( pos .getPosition ( ) )
184+ result .asParameter ( ) = getCallable ( arg ) .getParam ( pos .getPosition ( ) ) and
185+ isArgPostUpdate = false
182186 )
183187 or
184188 result .( RustDataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( ) =
185- getSourceNodeArgument ( source , s .headOfSingleton ( ) )
189+ getSourceNodeArgument ( source , s .headOfSingleton ( ) ) and
190+ isArgPostUpdate = true
191+ }
192+
193+ RustDataFlow:: Node getSourceNode ( Input:: SourceBase source , Impl:: Private:: SummaryComponentStack s ) {
194+ result = getSourceNode ( source , s , _)
186195 }
187196
188197 RustDataFlow:: Node getSinkNode ( Input:: SinkBase sink , Impl:: Private:: SummaryComponent sc ) {
0 commit comments