Skip to content

Commit 947c2bf

Browse files
committed
Dataflow: Move two declarations.
1 parent 1dd1f12 commit 947c2bf

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
527527
)
528528
}
529529

530-
private predicate sourceCallCtx(CallContext cc) {
531-
if hasSourceCallCtx() then cc instanceof CallContextSomeCall else cc instanceof CallContextAny
532-
}
533-
534530
private predicate hasSinkCallCtx() {
535531
exists(FlowFeature feature | feature = Config::getAFeature() |
536532
feature instanceof FeatureHasSinkCallContext or
@@ -3474,6 +3470,26 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
34743470
)
34753471
}
34763472

3473+
private module PrunedCallContextSensitivityStage5 {
3474+
private module CallContextSensitivityInput implements CallContextSensitivityInputSig {
3475+
predicate relevantCallEdgeIn = Stage5::relevantCallEdgeIn/2;
3476+
3477+
predicate relevantCallEdgeOut = Stage5::relevantCallEdgeOut/2;
3478+
3479+
predicate reducedViableImplInCallContextCand =
3480+
Stage5Param::reducedViableImplInCallContext/3;
3481+
3482+
predicate reducedViableImplInReturnCand = Stage5Param::reducedViableImplInReturn/2;
3483+
}
3484+
3485+
import CallContextSensitivity<CallContextSensitivityInput>
3486+
import LocalCallContext
3487+
}
3488+
3489+
private predicate sourceCallCtx(CallContext cc) {
3490+
if hasSourceCallCtx() then cc instanceof CallContextSomeCall else cc instanceof CallContextAny
3491+
}
3492+
34773493
private newtype TPathNode =
34783494
TPathNodeMid(
34793495
NodeEx node, FlowState state, CallContext cc, SummaryCtx sc, DataFlowType t, AccessPath ap,
@@ -4212,22 +4228,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
42124228
)
42134229
}
42144230

4215-
private module PrunedCallContextSensitivityStage5 {
4216-
private module CallContextSensitivityInput implements CallContextSensitivityInputSig {
4217-
predicate relevantCallEdgeIn = Stage5::relevantCallEdgeIn/2;
4218-
4219-
predicate relevantCallEdgeOut = Stage5::relevantCallEdgeOut/2;
4220-
4221-
predicate reducedViableImplInCallContextCand =
4222-
Stage5Param::reducedViableImplInCallContext/3;
4223-
4224-
predicate reducedViableImplInReturnCand = Stage5Param::reducedViableImplInReturn/2;
4225-
}
4226-
4227-
import CallContextSensitivity<CallContextSensitivityInput>
4228-
import LocalCallContext
4229-
}
4230-
42314231
pragma[nomagic]
42324232
private predicate pathOutOfCallable1(
42334233
PathNodeMid mid, DataFlowCall call, ReturnKindExt kind, FlowState state, CallContext cc,

0 commit comments

Comments
 (0)