You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -798,9 +798,21 @@ private module OutNodes {
798
798
799
799
import OutNodes
800
800
801
+
/**
802
+
* Holds if there is a data flow step from `e1` to `e2` that only steps from
803
+
* child to parent in the AST.
804
+
*/
805
+
privatepredicatesimpleAstFlowStep(Expre1,Expre2){
806
+
e2.(IfExpr).getBranch(_)=e1
807
+
or
808
+
e2.(AssignExpr).getSource()=e1
809
+
or
810
+
e2.(ArrayExpr).getAnElement()=e1
811
+
}
812
+
801
813
privatepredicateclosureFlowStep(Expre1,Expre2){
802
-
// simpleLocalFlowStep(exprNode(e1), exprNode(e2)) // TODO: find out why the java version uses simpleAstFlowStep... probably due to non-monotonic recursion
0 commit comments