mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Swift: move IteratorProtocol model to its own file
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Provides models for the `IteratorProtocol` Swift protocol.
|
||||
*/
|
||||
|
||||
private import codeql.swift.dataflow.ExternalFlow
|
||||
|
||||
/**
|
||||
* A model for `IteratorProtocol` members that permit taint flow.
|
||||
*/
|
||||
private class IteratorProtocolSummaries extends SummaryModelCsv {
|
||||
override predicate row(string row) {
|
||||
row =
|
||||
[
|
||||
";IteratorProtocol;true;next();;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,7 @@ private class SequenceSummaries extends SummaryModelCsv {
|
||||
";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1].ArrayElement;Argument[0].Parameter[0].CollectionElement;value",
|
||||
";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1].CollectionElement;Argument[0].Parameter[0].CollectionElement;value",
|
||||
";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[0].ReturnValue;ReturnValue.OptionalSome;value",
|
||||
";Sequence;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value",
|
||||
";IteratorProtocol;true;next();;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value"
|
||||
";Sequence;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ private import Data
|
||||
private import FileManager
|
||||
private import FilePath
|
||||
private import InputStream
|
||||
private import IteratorProtocol
|
||||
private import ManualMemoryManagement
|
||||
private import NsData
|
||||
private import NsObject
|
||||
|
||||
Reference in New Issue
Block a user