Skip to content

Commit 7cb665c

Browse files
committed
Swift: Move popLast to BidirectionalCollection and add popFirst.
1 parent d17c7bb commit 7cb665c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ private class CollectionSummaries extends SummaryModelCsv {
2525
";Collection;true;split(maxSplits:omittingEmptySubsequences:whereSeparator:);;;Argument[-1];ReturnValue;taint",
2626
";Collection;true;split(separator:maxSplits:omittingEmptySubsequences:);;;Argument[-1];ReturnValue;taint",
2727
";Collection;true;removeFirst();;;Argument[-1];ReturnValue;taint",
28+
";Collection;true;popFirst();;;Argument[-1];ReturnValue;taint",
2829
";RangeReplaceableCollection;true;append(_:);;;Argument[0];Argument[-1];taint",
2930
";RangeReplaceableCollection;true;append(contentsOf:);;;Argument[0];Argument[-1];taint",
3031
";RangeReplaceableCollection;true;remove(at:);;;Argument[-1];ReturnValue;taint",
3132
";RangeReplaceableCollection;true;removeFirst();;;Argument[-1];ReturnValue;taint",
3233
";RangeReplaceableCollection;true;removeLast();;;Argument[-1];ReturnValue;taint",
3334
";BidirectionalCollection;true;joined(separator:);;;Argument[-1..0];ReturnValue;taint",
3435
";BidirectionalCollection;true;last(where:);;;Argument[-1];ReturnValue;taint",
36+
";BidirectionalCollection;true;popLast();;;Argument[-1];ReturnValue;taint",
3537
]
3638
}
3739
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ private class StringSummaries extends SummaryModelCsv {
103103
";String;true;insert(_:at:);;;Argument[0];Argument[-1];taint",
104104
";String;true;insert(contentsOf:at:);;;Argument[0];Argument[-1];taint",
105105
";String;true;replaceSubrange(_:with::);;;Argument[1];Argument[-1];taint",
106-
";String;true;popLast();;;Argument[-1];ReturnValue;taint",
107106
";String;true;max();;;Argument[-1];ReturnValue;taint",
108107
";String;true;max(by:);;;Argument[-1];ReturnValue;taint",
109108
";String;true;min();;;Argument[-1];ReturnValue;taint",

0 commit comments

Comments
 (0)