File tree Expand file tree Collapse file tree
swift/ql/lib/codeql/swift/frameworks/StandardLibrary Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * Provides models for the `IteratorProtocol` Swift protocol.
3+ */
4+
5+ private import codeql.swift.dataflow.ExternalFlow
6+
7+ /**
8+ * A model for `IteratorProtocol` members that permit taint flow.
9+ */
10+ private class IteratorProtocolSummaries extends SummaryModelCsv {
11+ override predicate row ( string row ) {
12+ row =
13+ [
14+ ";IteratorProtocol;true;next();;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value"
15+ ]
16+ }
17+ }
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ private class SequenceSummaries extends SummaryModelCsv {
2929 ";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1].ArrayElement;Argument[0].Parameter[0].CollectionElement;value" ,
3030 ";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1].CollectionElement;Argument[0].Parameter[0].CollectionElement;value" ,
3131 ";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[0].ReturnValue;ReturnValue.OptionalSome;value" ,
32- ";Sequence;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value" ,
33- ";IteratorProtocol;true;next();;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value"
32+ ";Sequence;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value"
3433 ]
3534 }
3635}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ private import Data
99private import FileManager
1010private import FilePath
1111private import InputStream
12+ private import IteratorProtocol
1213private import ManualMemoryManagement
1314private import NsData
1415private import NsObject
You can’t perform that action at this time.
0 commit comments