Skip to content

Commit fbf25e4

Browse files
authored
Merge pull request #18507 from aschackmull/dataflow/join-fix
Dataflow: Minor join-order fix
2 parents 9021214 + 4223971 commit fbf25e4

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

+9-6
Original file line numberDiff line numberDiff line change
@@ -3127,6 +3127,14 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
31273127
override predicate isSource() { sourceNode(node, state) }
31283128
}
31293129

3130+
bindingset[p, state, t, ap, stored]
3131+
pragma[inline_late]
3132+
private SummaryCtxSome mkSummaryCtxSome(
3133+
ParamNodeEx p, FlowState state, Typ t, Ap ap, TypOption stored
3134+
) {
3135+
result = TSummaryCtxSome(p, state, t, ap, stored)
3136+
}
3137+
31303138
pragma[nomagic]
31313139
private predicate fwdFlowInStep(
31323140
ArgNodeEx arg, ParamNodeEx p, FlowState state, Cc outercc, CcCall innercc,
@@ -3138,7 +3146,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
31383146
or
31393147
FwdFlowInThrough::fwdFlowIn(_, arg, _, p, state, outercc, innercc, outerSummaryCtx, t,
31403148
ap, stored, _) and
3141-
innerSummaryCtx = TSummaryCtxSome(p, state, t, ap, stored)
3149+
innerSummaryCtx = mkSummaryCtxSome(p, state, t, ap, stored)
31423150
}
31433151

31443152
pragma[nomagic]
@@ -3871,11 +3879,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
38713879
bindingset[node, state, t0, ap]
38723880
predicate filter(NodeEx node, FlowState state, Typ t0, Ap ap, Typ t) {
38733881
exists(state) and
3874-
// We can get away with not using type strengthening here, since we aren't
3875-
// going to use the tracked types in the construction of Stage 4 access
3876-
// paths. For Stage 4 and onwards, the tracked types must be consistent as
3877-
// the cons candidates including types are used to construct subsequent
3878-
// access path approximations.
38793882
t0 = t and
38803883
(
38813884
notExpectsContent(node)

0 commit comments

Comments
 (0)