Skip to content

Commit f6d5e8d

Browse files
committed
Swift: update test .expected files
1 parent 799b4c9 commit f6d5e8d

18 files changed

+816
-401
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| declarations.swift:1:1:7:1 | Foo |
2-
| declarations.swift:1:8:1:8 | init() |
3-
| declarations.swift:1:8:1:8 | init(x:) |
2+
| declarations.swift:1:8:1:8 | Foo.init() |
3+
| declarations.swift:1:8:1:8 | Foo.init(x:) |
44
| declarations.swift:1:8:1:8 | self |
55
| declarations.swift:1:8:1:8 | self |
66
| declarations.swift:1:8:1:8 | x |
@@ -23,8 +23,8 @@
2323
| declarations.swift:5:5:5:38 | set |
2424
| declarations.swift:5:9:5:9 | newValue |
2525
| declarations.swift:9:1:9:34 | Bar |
26-
| declarations.swift:9:7:9:7 | deinit() |
27-
| declarations.swift:9:7:9:7 | init() |
26+
| declarations.swift:9:7:9:7 | Bar.deinit() |
27+
| declarations.swift:9:7:9:7 | Bar.init() |
2828
| declarations.swift:9:7:9:7 | self |
2929
| declarations.swift:9:7:9:7 | self |
3030
| declarations.swift:9:13:9:30 | var ... = ... |
@@ -95,9 +95,9 @@
9595
| declarations.swift:41:7:41:7 | set |
9696
| declarations.swift:41:7:41:7 | value |
9797
| declarations.swift:42:3:42:3 | self |
98-
| declarations.swift:42:3:44:3 | init() |
98+
| declarations.swift:42:3:44:3 | Baz.init() |
9999
| declarations.swift:46:3:46:3 | self |
100-
| declarations.swift:46:3:48:3 | deinit() |
100+
| declarations.swift:46:3:48:3 | Baz.deinit() |
101101
| declarations.swift:50:3:52:3 | +-(_:) |
102102
| declarations.swift:50:22:50:22 | self |
103103
| declarations.swift:50:26:50:33 | other |
@@ -106,7 +106,7 @@
106106
| declarations.swift:64:7:64:16 | +++ |
107107
| declarations.swift:66:7:66:21 | *** |
108108
| declarations.swift:68:18:74:1 | ZeroWrapper |
109-
| declarations.swift:68:25:68:25 | init() |
109+
| declarations.swift:68:25:68:25 | ZeroWrapper.init() |
110110
| declarations.swift:68:25:68:25 | self |
111111
| declarations.swift:69:3:73:3 | var ... = ... |
112112
| declarations.swift:69:7:69:7 | wrappedValue |
@@ -118,12 +118,12 @@
118118
| declarations.swift:77:20:77:20 | get |
119119
| declarations.swift:77:20:77:20 | x |
120120
| declarations.swift:81:1:136:1 | HasPropertyAndObserver |
121+
| declarations.swift:81:8:81:8 | HasPropertyAndObserver.init(normalField:hasWillSet1:hasWillSet2:hasDidSet1:hasDidSet2:hasBoth:) |
121122
| declarations.swift:81:8:81:8 | hasBoth |
122123
| declarations.swift:81:8:81:8 | hasDidSet1 |
123124
| declarations.swift:81:8:81:8 | hasDidSet2 |
124125
| declarations.swift:81:8:81:8 | hasWillSet1 |
125126
| declarations.swift:81:8:81:8 | hasWillSet2 |
126-
| declarations.swift:81:8:81:8 | init(normalField:hasWillSet1:hasWillSet2:hasDidSet1:hasDidSet2:hasBoth:) |
127127
| declarations.swift:81:8:81:8 | normalField |
128128
| declarations.swift:81:8:81:8 | self |
129129
| declarations.swift:82:3:87:3 | var ... = ... |
@@ -236,8 +236,8 @@
236236
| declarations.swift:139:8:139:8 | self |
237237
| declarations.swift:144:1:144:7 | { ... } |
238238
| declarations.swift:146:1:148:1 | GenericClass |
239-
| declarations.swift:146:7:146:7 | deinit() |
240-
| declarations.swift:146:7:146:7 | init() |
239+
| declarations.swift:146:7:146:7 | GenericClass<A, B, C>.deinit() |
240+
| declarations.swift:146:7:146:7 | GenericClass<A, B, C>.init() |
241241
| declarations.swift:146:7:146:7 | self |
242242
| declarations.swift:146:7:146:7 | self |
243243
| declarations.swift:146:20:146:20 | A |
@@ -256,9 +256,9 @@
256256
| declarations.swift:150:50:150:53 | _ |
257257
| declarations.swift:150:56:150:59 | _ |
258258
| declarations.swift:152:1:152:22 | Derived |
259-
| declarations.swift:152:7:152:7 | deinit() |
259+
| declarations.swift:152:7:152:7 | Derived.deinit() |
260260
| declarations.swift:152:7:152:7 | self |
261-
| declarations.swift:152:21:152:21 | init() |
261+
| declarations.swift:152:21:152:21 | Derived.init() |
262262
| declarations.swift:152:21:152:21 | self |
263263
| declarations.swift:155:1:155:28 | var ... = ... |
264264
| declarations.swift:155:1:155:28 | { ... } |

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

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@
1111
| expressions.swift:7:11:7:10 | call to appendLiteral(_:) | CallExpr |
1212
| expressions.swift:7:11:7:11 | $interpolation | DeclRefExpr |
1313
| expressions.swift:7:11:7:11 | &... | InOutExpr |
14-
| expressions.swift:7:11:7:11 | .appendLiteral(_:) | MethodRefExpr |
14+
| expressions.swift:7:11:7:11 | .appendLiteral(_:) | MethodLookupExpr |
1515
| expressions.swift:7:18:7:18 | $interpolation | DeclRefExpr |
1616
| expressions.swift:7:18:7:18 | &... | InOutExpr |
17-
| expressions.swift:7:18:7:18 | .appendInterpolation(_:) | MethodRefExpr |
17+
| expressions.swift:7:18:7:18 | .appendInterpolation(_:) | MethodLookupExpr |
1818
| expressions.swift:7:18:7:20 | call to appendInterpolation(_:) | CallExpr |
1919
| expressions.swift:7:19:7:19 | a | DeclRefExpr |
2020
| expressions.swift:7:21:7:21 | | StringLiteralExpr |
2121
| expressions.swift:7:21:7:21 | $interpolation | DeclRefExpr |
2222
| expressions.swift:7:21:7:21 | &... | InOutExpr |
23-
| expressions.swift:7:21:7:21 | .appendLiteral(_:) | MethodRefExpr |
23+
| expressions.swift:7:21:7:21 | .appendLiteral(_:) | MethodLookupExpr |
2424
| expressions.swift:7:21:7:21 | call to appendLiteral(_:) | CallExpr |
2525
| expressions.swift:8:15:8:15 | nil | NilLiteralExpr |
2626
| expressions.swift:15:9:15:9 | x | DeclRefExpr |
2727
| expressions.swift:15:9:15:14 | ... .!=(_:_:) ... | BinaryExpr |
28-
| expressions.swift:15:11:15:11 | .!=(_:_:) | MethodRefExpr |
28+
| expressions.swift:15:11:15:11 | .!=(_:_:) | MethodLookupExpr |
2929
| expressions.swift:15:11:15:11 | Int.Type | TypeExpr |
3030
| expressions.swift:15:14:15:14 | 0 | IntegerLiteralExpr |
3131
| expressions.swift:16:11:16:11 | AnError.Type | TypeExpr |
3232
| expressions.swift:16:11:16:19 | (Error) ... | ErasureExpr |
33-
| expressions.swift:16:11:16:19 | .failed | MethodRefExpr |
33+
| expressions.swift:16:11:16:19 | .failed | MethodLookupExpr |
3434
| expressions.swift:20:1:20:16 | try! ... | ForceTryExpr |
3535
| expressions.swift:20:6:20:6 | failure(_:) | DeclRefExpr |
3636
| expressions.swift:20:6:20:16 | call to failure(_:) | CallExpr |
@@ -41,9 +41,9 @@
4141
| expressions.swift:21:6:21:16 | call to failure(_:) | CallExpr |
4242
| expressions.swift:21:14:21:14 | 11 | IntegerLiteralExpr |
4343
| expressions.swift:27:13:27:13 | Klass.Type | TypeExpr |
44-
| expressions.swift:27:13:27:13 | call to init() | ConstructorRefCallExpr |
45-
| expressions.swift:27:13:27:13 | init() | DeclRefExpr |
46-
| expressions.swift:27:13:27:19 | call to init() | CallExpr |
44+
| expressions.swift:27:13:27:13 | Klass.init() | DeclRefExpr |
45+
| expressions.swift:27:13:27:13 | Klass.init() | MethodLookupExpr |
46+
| expressions.swift:27:13:27:19 | call to Klass.init() | CallExpr |
4747
| expressions.swift:29:9:29:19 | [...] | DictionaryExpr |
4848
| expressions.swift:29:10:29:10 | 1 | StringLiteralExpr |
4949
| expressions.swift:29:10:29:16 | (...) | TupleExpr |
@@ -86,31 +86,31 @@
8686
| expressions.swift:41:10:43:1 | { ... } | ClosureExpr |
8787
| expressions.swift:42:12:42:12 | x | DeclRefExpr |
8888
| expressions.swift:42:12:42:16 | ... .+(_:_:) ... | BinaryExpr |
89-
| expressions.swift:42:14:42:14 | .+(_:_:) | MethodRefExpr |
89+
| expressions.swift:42:14:42:14 | .+(_:_:) | MethodLookupExpr |
9090
| expressions.swift:42:14:42:14 | Int.Type | TypeExpr |
9191
| expressions.swift:42:16:42:16 | y | DeclRefExpr |
9292
| expressions.swift:44:1:44:1 | closured(closure:) | DeclRefExpr |
9393
| expressions.swift:44:1:46:1 | call to closured(closure:) | CallExpr |
9494
| expressions.swift:44:10:46:1 | { ... } | ClosureExpr |
9595
| expressions.swift:45:12:45:12 | x | DeclRefExpr |
9696
| expressions.swift:45:12:45:16 | ... .+(_:_:) ... | BinaryExpr |
97-
| expressions.swift:45:14:45:14 | .+(_:_:) | MethodRefExpr |
97+
| expressions.swift:45:14:45:14 | .+(_:_:) | MethodLookupExpr |
9898
| expressions.swift:45:14:45:14 | Int.Type | TypeExpr |
9999
| expressions.swift:45:16:45:16 | y | DeclRefExpr |
100100
| expressions.swift:47:1:47:1 | closured(closure:) | DeclRefExpr |
101101
| expressions.swift:47:1:47:27 | call to closured(closure:) | CallExpr |
102102
| expressions.swift:47:10:47:27 | { ... } | ClosureExpr |
103103
| expressions.swift:47:19:47:19 | $0 | DeclRefExpr |
104104
| expressions.swift:47:19:47:24 | ... .+(_:_:) ... | BinaryExpr |
105-
| expressions.swift:47:22:47:22 | .+(_:_:) | MethodRefExpr |
105+
| expressions.swift:47:22:47:22 | .+(_:_:) | MethodLookupExpr |
106106
| expressions.swift:47:22:47:22 | Int.Type | TypeExpr |
107107
| expressions.swift:47:24:47:24 | $1 | DeclRefExpr |
108108
| expressions.swift:48:1:48:1 | closured(closure:) | DeclRefExpr |
109109
| expressions.swift:48:1:48:20 | call to closured(closure:) | CallExpr |
110110
| expressions.swift:48:10:48:20 | { ... } | ClosureExpr |
111111
| expressions.swift:48:12:48:12 | $0 | DeclRefExpr |
112112
| expressions.swift:48:12:48:17 | ... .+(_:_:) ... | BinaryExpr |
113-
| expressions.swift:48:15:48:15 | .+(_:_:) | MethodRefExpr |
113+
| expressions.swift:48:15:48:15 | .+(_:_:) | MethodLookupExpr |
114114
| expressions.swift:48:15:48:15 | Int.Type | TypeExpr |
115115
| expressions.swift:48:17:48:17 | $1 | DeclRefExpr |
116116
| expressions.swift:54:1:54:1 | _ | DiscardAssignmentExpr |
@@ -133,7 +133,7 @@
133133
| expressions.swift:60:59:60:59 | $0 | DeclRefExpr |
134134
| expressions.swift:64:8:64:8 | x | DeclRefExpr |
135135
| expressions.swift:64:8:64:12 | ... .<(_:_:) ... | BinaryExpr |
136-
| expressions.swift:64:10:64:10 | .<(_:_:) | MethodRefExpr |
136+
| expressions.swift:64:10:64:10 | .<(_:_:) | MethodLookupExpr |
137137
| expressions.swift:64:10:64:10 | Int.Type | TypeExpr |
138138
| expressions.swift:64:12:64:12 | 0 | IntegerLiteralExpr |
139139
| expressions.swift:73:5:73:5 | .xx | MemberRefExpr |
@@ -148,15 +148,15 @@
148148
| expressions.swift:77:7:77:7 | call to _unimplementedInitializer(className:initName:file:line:column:) | CallExpr |
149149
| expressions.swift:77:7:77:7 | expressions.Derived | StringLiteralExpr |
150150
| expressions.swift:79:5:79:5 | super | SuperRefExpr |
151-
| expressions.swift:79:5:79:11 | call to ... | DotSyntaxCallExpr |
152-
| expressions.swift:79:5:79:21 | call to ... | CallExpr |
151+
| expressions.swift:79:5:79:11 | Base.init(x:) | MethodLookupExpr |
152+
| expressions.swift:79:5:79:21 | call to Base.init(x:) | CallExpr |
153153
| expressions.swift:79:5:79:21 | self = ... | RebindSelfInConstructorExpr |
154-
| expressions.swift:79:11:79:11 | init(x:) | OtherConstructorDeclRefExpr |
154+
| expressions.swift:79:11:79:11 | Base.init(x:) | OtherConstructorDeclRefExpr |
155155
| expressions.swift:79:19:79:19 | 22 | IntegerLiteralExpr |
156156
| expressions.swift:83:15:83:15 | Derived.Type | TypeExpr |
157-
| expressions.swift:83:15:83:15 | call to init() | ConstructorRefCallExpr |
158-
| expressions.swift:83:15:83:15 | init() | DeclRefExpr |
159-
| expressions.swift:83:15:83:23 | call to init() | CallExpr |
157+
| expressions.swift:83:15:83:15 | Derived.init() | DeclRefExpr |
158+
| expressions.swift:83:15:83:15 | Derived.init() | MethodLookupExpr |
159+
| expressions.swift:83:15:83:23 | call to Derived.init() | CallExpr |
160160
| expressions.swift:84:1:84:1 | _ | DiscardAssignmentExpr |
161161
| expressions.swift:84:1:84:13 | ... = ... | AssignExpr |
162162
| expressions.swift:84:5:84:5 | (Base) ... | DerivedToBaseExpr |
@@ -169,16 +169,16 @@
169169
| expressions.swift:88:1:88:7 | ...! | ForceValueExpr |
170170
| expressions.swift:88:3:88:3 | a | StringLiteralExpr |
171171
| expressions.swift:92:14:92:14 | Unmanaged<ToPtr>.Type | TypeExpr |
172-
| expressions.swift:92:14:92:24 | .passRetained(_:) | MethodRefExpr |
172+
| expressions.swift:92:14:92:24 | .passRetained(_:) | MethodLookupExpr |
173173
| expressions.swift:92:14:92:44 | call to passRetained(_:) | CallExpr |
174-
| expressions.swift:92:14:92:46 | .toOpaque() | MethodRefExpr |
174+
| expressions.swift:92:14:92:46 | .toOpaque() | MethodLookupExpr |
175175
| expressions.swift:92:14:92:55 | call to toOpaque() | CallExpr |
176176
| expressions.swift:92:37:92:37 | ToPtr.Type | TypeExpr |
177-
| expressions.swift:92:37:92:37 | call to init() | ConstructorRefCallExpr |
178-
| expressions.swift:92:37:92:37 | init() | DeclRefExpr |
179-
| expressions.swift:92:37:92:43 | call to init() | CallExpr |
177+
| expressions.swift:92:37:92:37 | ToPtr.init() | DeclRefExpr |
178+
| expressions.swift:92:37:92:37 | ToPtr.init() | MethodLookupExpr |
179+
| expressions.swift:92:37:92:43 | call to ToPtr.init() | CallExpr |
180180
| expressions.swift:93:1:93:16 | Unmanaged<ToPtr>.Type | TypeExpr |
181-
| expressions.swift:93:1:93:18 | .fromOpaque(_:) | MethodRefExpr |
181+
| expressions.swift:93:1:93:18 | .fromOpaque(_:) | MethodLookupExpr |
182182
| expressions.swift:93:1:93:35 | call to fromOpaque(_:) | CallExpr |
183183
| expressions.swift:93:29:93:29 | (UnsafeRawPointer) ... | PointerToPointerExpr |
184184
| expressions.swift:93:29:93:29 | opaque | DeclRefExpr |
@@ -231,42 +231,42 @@
231231
| expressions.swift:154:52:154:55 | #keyPath(...) | KeyPathExpr |
232232
| expressions.swift:158:3:158:3 | _ | DiscardAssignmentExpr |
233233
| expressions.swift:158:3:158:8 | ... = ... | AssignExpr |
234-
| expressions.swift:158:7:158:7 | .~(_:) | MethodRefExpr |
234+
| expressions.swift:158:7:158:7 | .~(_:) | MethodLookupExpr |
235235
| expressions.swift:158:7:158:7 | Int.Type | TypeExpr |
236236
| expressions.swift:158:7:158:8 | call to ~(_:) | PrefixUnaryExpr |
237237
| expressions.swift:158:8:158:8 | 1 | IntegerLiteralExpr |
238238
| expressions.swift:159:3:159:3 | _ | DiscardAssignmentExpr |
239239
| expressions.swift:159:3:159:11 | ... = ... | AssignExpr |
240240
| expressions.swift:159:7:159:7 | 1 | IntegerLiteralExpr |
241241
| expressions.swift:159:7:159:11 | ... .&(_:_:) ... | BinaryExpr |
242-
| expressions.swift:159:9:159:9 | .&(_:_:) | MethodRefExpr |
242+
| expressions.swift:159:9:159:9 | .&(_:_:) | MethodLookupExpr |
243243
| expressions.swift:159:9:159:9 | Int.Type | TypeExpr |
244244
| expressions.swift:159:11:159:11 | 2 | IntegerLiteralExpr |
245245
| expressions.swift:160:3:160:3 | _ | DiscardAssignmentExpr |
246246
| expressions.swift:160:3:160:11 | ... = ... | AssignExpr |
247247
| expressions.swift:160:7:160:7 | 1 | IntegerLiteralExpr |
248248
| expressions.swift:160:7:160:11 | ... .\|(_:_:) ... | BinaryExpr |
249-
| expressions.swift:160:9:160:9 | .\|(_:_:) | MethodRefExpr |
249+
| expressions.swift:160:9:160:9 | .\|(_:_:) | MethodLookupExpr |
250250
| expressions.swift:160:9:160:9 | Int.Type | TypeExpr |
251251
| expressions.swift:160:11:160:11 | 2 | IntegerLiteralExpr |
252252
| expressions.swift:161:3:161:3 | _ | DiscardAssignmentExpr |
253253
| expressions.swift:161:3:161:11 | ... = ... | AssignExpr |
254254
| expressions.swift:161:7:161:7 | 1 | IntegerLiteralExpr |
255255
| expressions.swift:161:7:161:11 | ... .^(_:_:) ... | BinaryExpr |
256-
| expressions.swift:161:9:161:9 | .^(_:_:) | MethodRefExpr |
256+
| expressions.swift:161:9:161:9 | .^(_:_:) | MethodLookupExpr |
257257
| expressions.swift:161:9:161:9 | Int.Type | TypeExpr |
258258
| expressions.swift:161:11:161:11 | 2 | IntegerLiteralExpr |
259259
| expressions.swift:162:3:162:3 | _ | DiscardAssignmentExpr |
260260
| expressions.swift:162:3:162:12 | ... = ... | AssignExpr |
261261
| expressions.swift:162:7:162:7 | 1 | IntegerLiteralExpr |
262262
| expressions.swift:162:7:162:12 | ... .<<(_:_:) ... | BinaryExpr |
263-
| expressions.swift:162:9:162:9 | .<<(_:_:) | MethodRefExpr |
263+
| expressions.swift:162:9:162:9 | .<<(_:_:) | MethodLookupExpr |
264264
| expressions.swift:162:9:162:9 | Int.Type | TypeExpr |
265265
| expressions.swift:162:12:162:12 | 0 | IntegerLiteralExpr |
266266
| expressions.swift:163:3:163:3 | _ | DiscardAssignmentExpr |
267267
| expressions.swift:163:3:163:12 | ... = ... | AssignExpr |
268268
| expressions.swift:163:7:163:7 | 1 | IntegerLiteralExpr |
269269
| expressions.swift:163:7:163:12 | ... .>>(_:_:) ... | BinaryExpr |
270-
| expressions.swift:163:9:163:9 | .>>(_:_:) | MethodRefExpr |
270+
| expressions.swift:163:9:163:9 | .>>(_:_:) | MethodLookupExpr |
271271
| expressions.swift:163:9:163:9 | Int.Type | TypeExpr |
272272
| expressions.swift:163:12:163:12 | 0 | IntegerLiteralExpr |

0 commit comments

Comments
 (0)