Skip to content

Commit 146c500

Browse files
rdmarsh2geoffw0
andauthored
Finish CollectionContent rename
Co-authored-by: Geoffrey White <[email protected]>
1 parent 3ebbb80 commit 146c500

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

swift/ql/lib/codeql/swift/dataflow/ExternalFlow.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ predicate parseContent(AccessPathToken component, Content content) {
493493
component.getName() = "ArrayElement" and
494494
content instanceof Content::ArrayContent
495495
or
496-
component.getName() = "SetElement" and
496+
component.getName() = "CollectionElement" and
497497
content instanceof Content::CollectionContent
498498
}
499499

swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPublic.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ module Content {
225225
override string toString() { result = "Array element" }
226226
}
227227

228-
/** An element of a set */
228+
/** An element of a collection. */
229229
class CollectionContent extends Content, TCollectionContent {
230-
override string toString() { result = "Set element" }
230+
override string toString() { result = "Collection element" }
231231
}
232232
}
233233

swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private string getContentSpecific(ContentSet cs) {
122122
or
123123
exists(Content::CollectionContent c |
124124
cs.isSingleton(c) and
125-
result = "SetElement"
125+
result = "CollectionElement"
126126
)
127127
}
128128

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private class CollectionSummaries extends SummaryModelCsv {
2626
";Collection;true;split(separator:maxSplits:omittingEmptySubsequences:);;;Argument[-1];ReturnValue;taint",
2727
";Collection;true;removeFirst();;;Argument[-1];ReturnValue;taint",
2828
";Collection;true;popFirst();;;Argument[-1];ReturnValue;taint",
29-
";Collection;true;randomElement();;;Argument[-1].SetElement;ReturnValue.OptionalSome;value",
29+
";Collection;true;randomElement();;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value",
3030
";Collection;true;randomElement();;;Argument[-1].ArrayElement;ReturnValue.OptionalSome;value",
3131
";RangeReplaceableCollection;true;append(_:);;;Argument[0];Argument[-1];taint",
3232
";RangeReplaceableCollection;true;append(contentsOf:);;;Argument[0];Argument[-1];taint",

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ private class SetSummaries extends SummaryModelCsv {
1111
override predicate row(string row) {
1212
row =
1313
[
14-
";Set;true;insert(_:);;;Argument[-1].SetElement;ReturnValue.TupleElement[1];value",
15-
";Set;true;insert(_:);;;Argument[0];Argument[-1].SetElement;value",
14+
";Set;true;insert(_:);;;Argument[-1].CollectionElement;ReturnValue.TupleElement[1];value",
15+
";Set;true;insert(_:);;;Argument[0];Argument[-1].CollectionElement;value",
1616
";Set;true;insert(_:);;;Argument[0];ReturnValue.TupleElement[1];value",
17-
";Set;true;init(_:);;;Argument[0].ArrayElement;ReturnValue.SetElement;value"
17+
";Set;true;init(_:);;;Argument[0].ArrayElement;ReturnValue.CollectionElement;value"
1818
]
1919
}
2020
}

0 commit comments

Comments
 (0)