Skip to content

Commit e1ef56b

Browse files
committed
Swift: Fix accidental cartesian product.
1 parent 7afcd1b commit e1ef56b

File tree

1 file changed

+1
-0
lines changed
  • swift/ql/lib/codeql/swift/dataflow

1 file changed

+1
-0
lines changed

swift/ql/lib/codeql/swift/dataflow/Ssa.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ module Ssa {
159159

160160
cached
161161
predicate adjacentReadPair(ControlFlowNode read1, ControlFlowNode read2) {
162+
read1 = this.getARead() and
162163
exists(SsaInput::BasicBlock bb1, int i1, SsaInput::BasicBlock bb2, int i2 |
163164
read1 = bb1.getNode(i1) and
164165
SsaImpl::adjacentUseUse(bb1, i1, bb2, i2, _, true) and

0 commit comments

Comments
 (0)