Skip to content

Commit 537caf8

Browse files
committed
Swift: Fix cartesian product.
1 parent e09e64e commit 537caf8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,6 @@ private module Cached {
106106
//or
107107
// step from previous read to Phi node
108108
localFlowSsaInput(nodeFrom, def, nodeTo.asDefinition())
109-
or
110-
// flow through `try!` and similar constructs
111-
nodeFrom.asExpr() = nodeTo.asExpr().(AnyTryExpr).getSubExpr()
112-
or
113-
// flow through `!`
114-
nodeFrom.asExpr() = nodeTo.asExpr().(ForceValueExpr).getSubExpr()
115109
)
116110
or
117111
exists(ParamReturnKind kind, ExprCfgNode arg |
@@ -120,6 +114,12 @@ private module Cached {
120114
)
121115
or
122116
nodeFrom.asExpr() = nodeTo.asExpr().(InOutExpr).getSubExpr()
117+
or
118+
// flow through `try!` and similar constructs
119+
nodeFrom.asExpr() = nodeTo.asExpr().(AnyTryExpr).getSubExpr()
120+
or
121+
// flow through `!`
122+
nodeFrom.asExpr() = nodeTo.asExpr().(ForceValueExpr).getSubExpr()
123123
}
124124

125125
/**

0 commit comments

Comments
 (0)