Skip to content

Commit d17c7bb

Browse files
committed
Swift: Move first(_:), last(_:) into Sequence, BidirectionalCollection.
1 parent 3586926 commit d17c7bb

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Collection.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ private class CollectionSummaries extends SummaryModelCsv {
3131
";RangeReplaceableCollection;true;removeFirst();;;Argument[-1];ReturnValue;taint",
3232
";RangeReplaceableCollection;true;removeLast();;;Argument[-1];ReturnValue;taint",
3333
";BidirectionalCollection;true;joined(separator:);;;Argument[-1..0];ReturnValue;taint",
34+
";BidirectionalCollection;true;last(where:);;;Argument[-1];ReturnValue;taint",
3435
]
3536
}
3637
}

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Sequence.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ private class SequenceSummaries extends SummaryModelCsv {
2424
";Sequence;true;split(separator:maxSplits:omittingEmptySubsequences:);;;Argument[-1];ReturnValue;taint",
2525
";Sequence;true;joined();;;Argument[-1];ReturnValue;taint",
2626
";Sequence;true;joined(separator:);;;Argument[-1..0];ReturnValue;taint",
27+
";Sequence;true;first(where:);;;Argument[-1];ReturnValue;taint",
2728
]
2829
}
2930
}

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/String.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ private class StringSummaries extends SummaryModelCsv {
104104
";String;true;insert(contentsOf:at:);;;Argument[0];Argument[-1];taint",
105105
";String;true;replaceSubrange(_:with::);;;Argument[1];Argument[-1];taint",
106106
";String;true;popLast();;;Argument[-1];ReturnValue;taint",
107-
";String;true;first(where:);;;Argument[-1];ReturnValue;taint",
108-
";String;true;last(where:);;;Argument[-1];ReturnValue;taint",
109107
";String;true;max();;;Argument[-1];ReturnValue;taint",
110108
";String;true;max(by:);;;Argument[-1];ReturnValue;taint",
111109
";String;true;min();;;Argument[-1];ReturnValue;taint",

0 commit comments

Comments
 (0)