Skip to content

Commit ff55eff

Browse files
authored
Merge pull request #9549 from github/alexdenisov/remove-to-string-from-unknown-element
Swift: remove toString from UnknownElement
2 parents 7123735 + 311dcfa commit ff55eff

File tree

6 files changed

+83
-262
lines changed

6 files changed

+83
-262
lines changed

swift/ql/lib/codeql/swift/elements/Element.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ class Element extends ElementBase {
1717

1818
class UnknownElement extends Element {
1919
UnknownElement() { isUnknown() }
20-
21-
override string toString() { result = "TBD (" + getPrimaryQlClasses() + ")" }
2220
}

swift/ql/test/extractor-tests/expressions/all.expected

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
| expressions.swift:15:14:15:14 | 0 |
3333
| expressions.swift:16:11:16:11 | AnError.Type |
3434
| expressions.swift:16:11:16:19 | (Error) ... |
35-
| expressions.swift:16:11:16:19 | (TBD (ExistentialType)) ... |
3635
| expressions.swift:16:11:16:19 | call to ... |
3736
| expressions.swift:16:19:16:19 | failed |
3837
| expressions.swift:20:1:20:16 | try! ... |
@@ -77,7 +76,6 @@
7776
| expressions.swift:35:6:35:6 | default terminator |
7877
| expressions.swift:35:7:35:7 | d |
7978
| expressions.swift:35:7:35:12 | (Any) ... |
80-
| expressions.swift:35:7:35:12 | (TBD (ProtocolCompositionType)) ... |
8179
| expressions.swift:35:7:35:12 | ...[...] |
8280
| expressions.swift:35:7:35:12 | [...] |
8381
| expressions.swift:35:7:35:12 | [...] |
@@ -125,7 +123,7 @@
125123
| expressions.swift:54:1:54:1 | _ |
126124
| expressions.swift:54:1:54:8 | ... = ... |
127125
| expressions.swift:54:5:54:8 | #keyPath(...) |
128-
| expressions.swift:54:6:54:8 | TBD (UnresolvedDotExpr) |
126+
| expressions.swift:54:6:54:8 | UnresolvedDotExpr |
129127
| expressions.swift:58:16:58:16 | 1234 |
130128
| expressions.swift:59:1:59:1 | unsafeFunction |
131129
| expressions.swift:59:1:59:34 | call to unsafeFunction |
@@ -243,4 +241,4 @@
243241
| expressions.swift:154:22:154:56 | \\...[...] |
244242
| expressions.swift:154:33:154:33 | keyPathB |
245243
| expressions.swift:154:52:154:55 | #keyPath(...) |
246-
| expressions.swift:154:53:154:55 | TBD (UnresolvedDotExpr) |
244+
| expressions.swift:154:53:154:55 | UnresolvedDotExpr |

swift/ql/test/extractor-tests/patterns/all.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
| patterns.swift:12:14:12:21 | (...) |
1414
| patterns.swift:12:15:12:15 | xx |
1515
| patterns.swift:12:19:12:19 | yy |
16-
| patterns.swift:16:10:16:14 | TBD (SequenceExpr) |
16+
| patterns.swift:16:10:16:14 | SequenceExpr |
1717
| patterns.swift:17:10:17:10 | _ |
1818
| patterns.swift:24:9:24:9 | v |
1919
| patterns.swift:24:9:24:12 | ... as ... |

swift/ql/test/extractor-tests/types/Types.expected

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@
55
| types.swift:3:6:3:6 | default terminator | String |
66
| types.swift:3:7:3:7 | x | Int |
77
| types.swift:3:7:3:11 | (Any) ... | Any |
8-
| types.swift:3:7:3:11 | (Any) ... | TBD (ProtocolCompositionType) |
9-
| types.swift:3:7:3:11 | (TBD (ProtocolCompositionType)) ... | Any |
10-
| types.swift:3:7:3:11 | (TBD (ProtocolCompositionType)) ... | TBD (ProtocolCompositionType) |
118
| types.swift:3:7:3:11 | ... call to + ... | Int |
129
| types.swift:3:7:3:11 | [...] | Any... |
1310
| types.swift:3:7:3:11 | [...] | Any... |
14-
| types.swift:3:7:3:11 | [...] | TBD (VariadicSequenceType) |
15-
| types.swift:3:7:3:11 | [...] | TBD (VariadicSequenceType) |
1611
| types.swift:3:9:3:9 | + | (Int.Type) -> (Int, Int) -> Int |
1712
| types.swift:3:9:3:9 | Int.Type | Int.Type |
1813
| types.swift:3:9:3:9 | call to + | (Int, Int) -> Int |

0 commit comments

Comments
 (0)