Skip to content

Commit 5dd7c14

Browse files
committed
Swift: add getSequence back to ForEachStmt
1 parent 9c3b72c commit 5dd7c14

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

swift/ql/lib/codeql/swift/elements/stmt/ForEachStmt.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,12 @@ class ForEachStmt extends Generated::ForEachStmt {
66
then result = "for ... in ... where ... { ... }"
77
else result = "for ... in ... { ... }"
88
}
9+
10+
/*
11+
* Gets the sequence of this for each statement.
12+
*/
13+
14+
final Expr getSequence() {
15+
result = this.getIteratorVar().getInit(0)
16+
}
917
}

0 commit comments

Comments
 (0)