Skip to content

Commit 1b4520b

Browse files
committed
Data flow: Update QL doc
1 parent 81ed72c commit 1b4520b

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2057,7 +2057,7 @@ module MakeImpl<InputSig Lang> {
20572057
}
20582058

20592059
DataFlowCallable viableImplCallContextReducedReverse(DataFlowCall call, CcNoCall ctx) {
2060-
result = prunedViableImplInCallContextReverse(call, ctx)
2060+
call = prunedViableImplInCallContextReverse(result, ctx)
20612061
}
20622062

20632063
predicate viableImplNotCallContextReducedReverse(CcNoCall ctx) {

shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -774,17 +774,18 @@ module MakeImplCommon<InputSig Lang> {
774774
}
775775

776776
/**
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.
781780
*/
782781
cached
783-
DataFlowCallable prunedViableImplInCallContextReverse(DataFlowCall call, CallContextReturn ctx) {
782+
DataFlowCall prunedViableImplInCallContextReverse(
783+
DataFlowCallable callable, CallContextReturn ctx
784+
) {
784785
exists(DataFlowCallable c0, DataFlowCall call0 |
785-
callEnclosingCallable(call0, result) and
786+
callEnclosingCallable(call0, callable) and
786787
ctx = TReturn(c0, call0) and
787-
c0 = viableImplInCallContextExt(call0, call) and
788+
c0 = viableImplInCallContextExt(call0, result) and
788789
reducedViableImplInReturn(c0, call0)
789790
)
790791
}
@@ -1305,7 +1306,7 @@ module MakeImplCommon<InputSig Lang> {
13051306
predicate resolveReturn(CallContext cc, DataFlowCallable callable, DataFlowCall call) {
13061307
cc instanceof CallContextAny and callable = viableCallableExt(call)
13071308
or
1308-
callable = prunedViableImplInCallContextReverse(call, cc)
1309+
call = prunedViableImplInCallContextReverse(callable, cc)
13091310
}
13101311

13111312
/**

0 commit comments

Comments
 (0)