Skip to content

Commit

Permalink
Merge pull request #18512 from aschackmull/dataflow/join-fix2
Browse files Browse the repository at this point in the history
Dataflow: Another minor join-order fix
  • Loading branch information
aschackmull authored Jan 17, 2025
2 parents 65a11e4 + 20af2d5 commit 498bfd2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -2154,8 +2154,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
pragma[nomagic]
private predicate storeStepFwd(NodeEx node1, Ap ap1, Content c, NodeEx node2, Ap ap2) {
fwdFlowStore(node1, _, ap1, _, c, _, _, node2, _, _, _) and
ap2 = apCons(c, ap1) and
readStepFwd(_, ap2, c, _, _)
readStepFwd(_, ap2, c, _, ap1)
}

pragma[nomagic]
Expand Down Expand Up @@ -4393,6 +4392,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
Typ getTyp(DataFlowType t) { result = t }

bindingset[c, tail]
pragma[inline_late]
Ap apCons(Content c, Ap tail) { result.isCons(c, tail) }

class ApHeadContent = Content;
Expand Down Expand Up @@ -4462,6 +4462,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
abstract Content getHead();

/** Holds if this is a representation of `head` followed by `tail`. */
pragma[nomagic]
abstract predicate isCons(Content head, AccessPath tail);

/** Gets the front of this access path. */
Expand Down

0 comments on commit 498bfd2

Please sign in to comment.