@@ -774,17 +774,18 @@ module MakeImplCommon<InputSig Lang> {
774
774
}
775
775
776
776
/**
777
- * Gets a viable run-time dispatch target for the call `call` in the
778
- * context `ctx`. This is restricted to those calls and results for which
779
- * the return flow from the result to `call` restricts the possible context
780
- * `ctx`.
777
+ * Gets a viable call site for the return from `callable` in call context
778
+ * `ctx`. This is restricted to those callables and contexts for which
779
+ * the possible call sites are restricted.
781
780
*/
782
781
cached
783
- DataFlowCallable prunedViableImplInCallContextReverse ( DataFlowCall call , CallContextReturn ctx ) {
782
+ DataFlowCall prunedViableImplInCallContextReverse (
783
+ DataFlowCallable callable , CallContextReturn ctx
784
+ ) {
784
785
exists ( DataFlowCallable c0 , DataFlowCall call0 |
785
- callEnclosingCallable ( call0 , result ) and
786
+ callEnclosingCallable ( call0 , callable ) and
786
787
ctx = TReturn ( c0 , call0 ) and
787
- c0 = viableImplInCallContextExt ( call0 , call ) and
788
+ c0 = viableImplInCallContextExt ( call0 , result ) and
788
789
reducedViableImplInReturn ( c0 , call0 )
789
790
)
790
791
}
@@ -1305,7 +1306,7 @@ module MakeImplCommon<InputSig Lang> {
1305
1306
predicate resolveReturn ( CallContext cc , DataFlowCallable callable , DataFlowCall call ) {
1306
1307
cc instanceof CallContextAny and callable = viableCallableExt ( call )
1307
1308
or
1308
- callable = prunedViableImplInCallContextReverse ( call , cc )
1309
+ call = prunedViableImplInCallContextReverse ( callable , cc )
1309
1310
}
1310
1311
1311
1312
/**
0 commit comments