Skip to content

Commit 8834de5

Browse files
authored
Merge pull request #22795 from asgerf/unified/member-tostring
unified: Enhance toString of members
2 parents b5b8165 + f66896b commit 8834de5

6 files changed

Lines changed: 119 additions & 55 deletions

File tree

‎unified/ql/lib/codeql/unified/internal/AstExtra.qll‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
22
* Provides additional AST-like classes outside the generated tree-sitter classes.
33
*/
4+
overlay[local?]
5+
module;
46

57
private import unified
68
private import codeql.unified.internal.NameBindingPlugin

‎unified/ql/lib/codeql/unified/internal/FacadeAst.qll‎

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,63 @@ module Unified {
153153
string getLabelName() { result = this.getLabelNameNode().getValue() }
154154
}
155155

156+
class Member extends G::Member {
157+
/** Gets the unqualified name of this member or a fallback name such as `(anonymous function)` if it has no explicit name. */
158+
string getNameOrFallback() {
159+
result = this.getNameNode().getValue()
160+
or
161+
not exists(this.getNameNode()) and
162+
(
163+
this instanceof ConstructorDeclaration and
164+
result = "(constructor)"
165+
or
166+
this instanceof DestructorDeclaration and
167+
result = "(destructor)"
168+
or
169+
this instanceof FunctionDeclaration and
170+
result = "(anonymous function)"
171+
or
172+
this instanceof VariableDeclaration and
173+
result = "(pattern assignment)" // this case is only reachable when the target is a destructuring pattern
174+
or
175+
this instanceof InitializerDeclaration and
176+
result = "(initializer block)"
177+
or
178+
exists(ClassLikeDeclaration cls | this = cls |
179+
result = NameBinding::getIdentifierFromRef(cls.getExtensionTarget()).getValue()
180+
or
181+
not exists(cls.getExtensionTarget()) and
182+
result = "(anonymous class)"
183+
)
184+
or
185+
this instanceof TypeAliasDeclaration and
186+
result = "(anonymous type alias)"
187+
or
188+
this instanceof AssociatedTypeDeclaration and
189+
result = "(anonymous associated type)"
190+
or
191+
this instanceof UnsupportedNode and
192+
result = "(unsupported node)"
193+
or
194+
this instanceof UnhandledNode and
195+
result = "(unhandled node)"
196+
)
197+
}
198+
199+
/**
200+
* Gets the name of this member qualified by the short names of each immediately-enclosing class.
201+
*/
202+
string getQualifiedName() {
203+
exists(ClassLikeDeclaration cls |
204+
this = cls.getAMember() and
205+
result = cls.getQualifiedName() + "." + this.getNameOrFallback()
206+
)
207+
or
208+
not this = any(ClassLikeDeclaration cls).getAMember() and
209+
result = this.getNameOrFallback()
210+
}
211+
}
212+
156213
class ClassLikeDeclaration extends G::ClassLikeDeclaration {
157214
/** Gets the name of this declaration. */
158215
string getName() { result = this.getNameNode().getValue() }
@@ -164,7 +221,7 @@ module Unified {
164221
}
165222

166223
override string toString() {
167-
result = concat(getClassLikeDeclarationKeyword(this) + " ") + concat(this.getName())
224+
result = concat(getClassLikeDeclarationKeyword(this) + " ") + concat(this.getQualifiedName())
168225
}
169226
}
170227

@@ -173,7 +230,8 @@ module Unified {
173230
string getName() { result = this.getNameNode().getValue() }
174231

175232
override string toString() {
176-
result = concat(getConstructorDeclarationKeyword(this) + " ") + concat(this.getName())
233+
result =
234+
concat(getConstructorDeclarationKeyword(this) + " ") + concat(this.getQualifiedName())
177235
}
178236
}
179237

@@ -187,7 +245,7 @@ module Unified {
187245
string getName() { result = this.getNameNode().getValue() }
188246

189247
override string toString() {
190-
result = concat(getFunctionDeclarationKeyword(this) + " ") + concat(this.getName())
248+
result = concat(getFunctionDeclarationKeyword(this) + " ") + concat(this.getQualifiedName())
191249
}
192250
}
193251

@@ -199,7 +257,7 @@ module Unified {
199257
string getName() { result = this.getNameNode().getValue() }
200258

201259
override string toString() {
202-
result = concat(getVariableDeclarationKeyword(this) + " ") + concat(this.getName())
260+
result = concat(getVariableDeclarationKeyword(this) + " ") + concat(this.getQualifiedName())
203261
}
204262
}
205263

‎unified/ql/lib/codeql/unified/internal/LocalNameBinding.qll‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
22
* Provides classes for reasoning about lexically scoped names and references to these.
33
*/
4+
overlay[local?]
5+
module;
46

57
private import unified
68
private import unified as U

‎unified/ql/lib/codeql/unified/internal/StaticNameBinding.qll‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
22
* Provides classes for reasoning about static references to the members of classes and top-levels.
33
*/
4+
overlay[local?]
5+
module;
46

57
private import unified
68
private import codeql.unified.internal.LocalNameBinding
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
generatedConstructor
2-
| constructors.swift:1:1:1:0 | init |
3-
| constructors.swift:3:1:3:0 | init |
4-
| constructors.swift:19:1:19:0 | init |
5-
| constructors.swift:31:1:31:0 | init |
6-
| constructors.swift:39:1:39:0 | init |
2+
| constructors.swift:1:1:1:0 | C1.init |
3+
| constructors.swift:3:1:3:0 | C2.init |
4+
| constructors.swift:19:1:19:0 | C5.init |
5+
| constructors.swift:31:1:31:0 | C7.init |
6+
| constructors.swift:39:1:39:0 | S1.init |
77
implicitReceiverParameter
8-
| constructors.swift:1:1:1:0 | self | constructors.swift:1:1:1:0 | init |
9-
| constructors.swift:3:1:3:0 | self | constructors.swift:3:1:3:0 | init |
10-
| constructors.swift:6:5:6:13 | self | constructors.swift:6:5:6:13 | init |
11-
| constructors.swift:10:5:12:5 | self | constructors.swift:10:5:12:5 | init |
12-
| constructors.swift:14:5:16:5 | self | constructors.swift:14:5:16:5 | convenience init |
13-
| constructors.swift:19:1:19:0 | self | constructors.swift:19:1:19:0 | init |
14-
| constructors.swift:22:5:22:25 | self | constructors.swift:22:5:22:25 | init |
15-
| constructors.swift:24:5:24:30 | self | constructors.swift:24:5:24:30 | init |
16-
| constructors.swift:26:5:28:5 | self | constructors.swift:26:5:28:5 | convenience init |
17-
| constructors.swift:31:1:31:0 | self | constructors.swift:31:1:31:0 | init |
18-
| constructors.swift:34:5:36:5 | self | constructors.swift:34:5:36:5 | convenience init |
19-
| constructors.swift:39:1:39:0 | self | constructors.swift:39:1:39:0 | init |
8+
| constructors.swift:1:1:1:0 | self | constructors.swift:1:1:1:0 | C1.init |
9+
| constructors.swift:3:1:3:0 | self | constructors.swift:3:1:3:0 | C2.init |
10+
| constructors.swift:6:5:6:13 | self | constructors.swift:6:5:6:13 | C3.init |
11+
| constructors.swift:10:5:12:5 | self | constructors.swift:10:5:12:5 | C4.init |
12+
| constructors.swift:14:5:16:5 | self | constructors.swift:14:5:16:5 | convenience C4.init |
13+
| constructors.swift:19:1:19:0 | self | constructors.swift:19:1:19:0 | C5.init |
14+
| constructors.swift:22:5:22:25 | self | constructors.swift:22:5:22:25 | C6.init |
15+
| constructors.swift:24:5:24:30 | self | constructors.swift:24:5:24:30 | C6.init |
16+
| constructors.swift:26:5:28:5 | self | constructors.swift:26:5:28:5 | convenience C6.init |
17+
| constructors.swift:31:1:31:0 | self | constructors.swift:31:1:31:0 | C7.init |
18+
| constructors.swift:34:5:36:5 | self | constructors.swift:34:5:36:5 | convenience C8.init |
19+
| constructors.swift:39:1:39:0 | self | constructors.swift:39:1:39:0 | S1.init |
2020
| constructors.swift:46:9:48:9 | self | constructors.swift:46:9:48:9 | AccessorDeclaration |
2121
| constructors.swift:49:9:51:9 | self | constructors.swift:49:9:51:9 | AccessorDeclaration |
2222
| constructors.swift:54:9:56:9 | self | constructors.swift:54:9:56:9 | AccessorDeclaration |
2323
| constructors.swift:57:9:59:9 | self | constructors.swift:57:9:59:9 | AccessorDeclaration |
2424
defaultConstructorParameter
25-
| constructors.swift:39:1:39:0 | init | 1 | constructors.swift:39:1:39:0 | f1 [init default constructor] | f1 | true |
26-
| constructors.swift:39:1:39:0 | init | 2 | constructors.swift:39:1:39:0 | f2 [init default constructor] | f2 | false |
27-
| constructors.swift:39:1:39:0 | init | 3 | constructors.swift:39:1:39:0 | f4 [init default constructor] | f4 | false |
28-
| constructors.swift:39:1:39:0 | init | 4 | constructors.swift:39:1:39:0 | f7 [init default constructor] | f7 | true |
29-
| constructors.swift:39:1:39:0 | init | 5 | constructors.swift:39:1:39:0 | f8 [init default constructor] | f8 | true |
25+
| constructors.swift:39:1:39:0 | S1.init | 1 | constructors.swift:39:1:39:0 | f1 [init default constructor] | f1 | true |
26+
| constructors.swift:39:1:39:0 | S1.init | 2 | constructors.swift:39:1:39:0 | f2 [init default constructor] | f2 | false |
27+
| constructors.swift:39:1:39:0 | S1.init | 3 | constructors.swift:39:1:39:0 | f4 [init default constructor] | f4 | false |
28+
| constructors.swift:39:1:39:0 | S1.init | 4 | constructors.swift:39:1:39:0 | f7 [init default constructor] | f7 | true |
29+
| constructors.swift:39:1:39:0 | S1.init | 5 | constructors.swift:39:1:39:0 | f8 [init default constructor] | f8 | true |
3030
defaultConstructorParameterType
31-
| constructors.swift:39:1:39:0 | init | 2 | constructors.swift:39:1:39:0 | f2 [init default constructor] | f2 | constructors.swift:41:13:41:18 | String |
32-
| constructors.swift:39:1:39:0 | init | 3 | constructors.swift:39:1:39:0 | f4 [init default constructor] | f4 | constructors.swift:43:13:43:18 | Double |
33-
| constructors.swift:39:1:39:0 | init | 4 | constructors.swift:39:1:39:0 | f7 [init default constructor] | f7 | constructors.swift:53:13:53:18 | Double |
34-
| constructors.swift:39:1:39:0 | init | 5 | constructors.swift:39:1:39:0 | f8 [init default constructor] | f8 | constructors.swift:61:13:61:16 | GenericTypeExpr |
31+
| constructors.swift:39:1:39:0 | S1.init | 2 | constructors.swift:39:1:39:0 | f2 [init default constructor] | f2 | constructors.swift:41:13:41:18 | String |
32+
| constructors.swift:39:1:39:0 | S1.init | 3 | constructors.swift:39:1:39:0 | f4 [init default constructor] | f4 | constructors.swift:43:13:43:18 | Double |
33+
| constructors.swift:39:1:39:0 | S1.init | 4 | constructors.swift:39:1:39:0 | f7 [init default constructor] | f7 | constructors.swift:53:13:53:18 | Double |
34+
| constructors.swift:39:1:39:0 | S1.init | 5 | constructors.swift:39:1:39:0 | f8 [init default constructor] | f8 | constructors.swift:61:13:61:16 | GenericTypeExpr |

‎unified/ql/test/library-tests/controlflow/basicblock-slices.expected‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
| 7 | cfg.swift:7:1:7:10 | returnZero | 'returnZero -^ returnZero(...)' |
77
| 8 | cfg.swift:8:1:8:6 | Double | 'Double -> Argument -V topLevelDecl -^ Double(...)' |
88
| 10 | cfg.swift:10:1:13:1 | enum MyError | 'enum MyError -V MyError -> BaseType -V Error' |
9-
| 11 | cfg.swift:11:10:11:15 | error1 | 'error1 -V error1 -> error2 -V error2' |
10-
| 12 | cfg.swift:12:10:12:31 | error3 | 'error3 -V error3 -^ ' |
9+
| 11 | cfg.swift:11:10:11:15 | MyError.error1 | 'MyError.error1 -V error1 -> MyError.error2 -V error2' |
10+
| 12 | cfg.swift:12:10:12:31 | MyError.error3 | 'MyError.error3 -V error3 -^ MyError.error3.(constructor)' |
1111
| 12 | cfg.swift:12:17:12:25 | withParam | 'withParam -? Block' |
1212
| 15 | cfg.swift:15:1:17:1 | func isZero | 'func isZero' |
1313
| 15 | cfg.swift:15:13:15:13 | x | 'x -> Block' |
@@ -82,11 +82,11 @@
8282
| 96 | cfg.swift:96:3:96:13 | addOptional | 'addOptional -> Argument -V tempOptional -^ & ... -^ addOptional(...)' |
8383
| 97 | cfg.swift:97:10:97:13 | temp | 'temp -> tempOptional -^ ... ! -^ ... + ... -^ ReturnExpr' |
8484
| 100 | cfg.swift:100:1:109:1 | class C | 'class C -V C' |
85-
| 101 | cfg.swift:101:3:101:16 | let myInt | 'let myInt -V myInt -> Int' |
86-
| 102 | cfg.swift:102:3:104:3 | init | 'init' |
85+
| 101 | cfg.swift:101:3:101:16 | let C.myInt | 'let C.myInt -V myInt -> Int' |
86+
| 102 | cfg.swift:102:3:104:3 | C.init | 'C.init' |
8787
| 102 | cfg.swift:102:8:102:8 | n | 'n -> Block' |
8888
| 103 | cfg.swift:103:5:103:9 | myInt | 'myInt -> n -^ ... = ...' |
89-
| 106 | cfg.swift:106:3:108:3 | func getMyInt | 'func getMyInt' |
89+
| 106 | cfg.swift:106:3:108:3 | func C.getMyInt | 'func C.getMyInt' |
9090
| 106 | cfg.swift:106:26:108:3 | Block | 'Block' |
9191
| 107 | cfg.swift:107:12:107:16 | myInt | 'myInt -^ ReturnExpr' |
9292
| 111 | cfg.swift:111:1:137:1 | func testMemberRef | 'func testMemberRef' |
@@ -245,7 +245,7 @@
245245
| 304 | cfg.swift:304:3:304:3 | b | 'b -> Argument -V 8 -^ b(...) -> b -> Argument -V 7 -^ b(...) -> 1 -^ ... ^ ... -^ ... = ...' |
246246
| 305 | cfg.swift:305:3:305:3 | b | 'b -> Argument -V 9 -^ b(...) -> b -> Argument -V 8 -^ b(...) -> 1 -^ ... << ... -^ ... = ...' |
247247
| 306 | cfg.swift:306:3:306:3 | b | 'b -> Argument -V 10 -^ b(...) -> b -> Argument -V 9 -^ b(...) -> 1 -^ ... >> ... -^ ... = ...' |
248-
| 308 | cfg.swift:308:3:308:39 | let | 'let -V Argument -V a1 -> Argument -V a2 -> Argument -V a3 -> Argument -V a4 -> Argument -V a5 -^ TupleExpr -> tupleWithA' |
248+
| 308 | cfg.swift:308:3:308:39 | let (pattern assignment) | 'let (pattern assignment) -V Argument -V a1 -> Argument -V a2 -> Argument -V a3 -> Argument -V a4 -> Argument -V a5 -^ TupleExpr -> tupleWithA' |
249249
| 309 | cfg.swift:309:11:309:19 | Argument | 'Argument -V a1 -> b -> Argument -V 0 -^ b(...) -^ ... + ... -> Argument -V a2 -> b -> Argument -V 1 -^ b(...) -^ ... + ... -> Argument -V a3 -> b -> Argument -V 2 -^ b(...) -^ ... + ... -> Argument -V a4 -> b -> Argument -V 3 -^ b(...) -^ ... + ... -> Argument -V a5 -> b -> Argument -V 4 -^ b(...) -^ ... + ... -^ TupleExpr -^ ReturnExpr' |
250250
| 312 | cfg.swift:312:1:317:1 | func loop1 | 'func loop1' |
251251
| 312 | cfg.swift:312:12:312:12 | x | 'x -> Block' |
@@ -302,11 +302,11 @@
302302
| 360 | cfg.swift:360:17:362:3 | Block | 'Block' |
303303
| 361 | cfg.swift:361:5:361:5 | x | 'x -> 1 -^ ... += ...' |
304304
| 365 | cfg.swift:365:1:374:1 | class OptionalC | 'class OptionalC -V OptionalC' |
305-
| 366 | cfg.swift:366:3:366:11 | let c | 'let c -V c -> Optional -> C -^ GenericTypeExpr' |
306-
| 367 | cfg.swift:367:3:369:3 | init | 'init' |
305+
| 366 | cfg.swift:366:3:366:11 | let OptionalC.c | 'let OptionalC.c -V c -> Optional -> C -^ GenericTypeExpr' |
306+
| 367 | cfg.swift:367:3:369:3 | OptionalC.init | 'OptionalC.init' |
307307
| 367 | cfg.swift:367:8:367:10 | arg | 'arg -> Block' |
308308
| 368 | cfg.swift:368:5:368:5 | c | 'c -> arg -^ ... = ...' |
309-
| 371 | cfg.swift:371:3:373:3 | func getOptional | 'func getOptional' |
309+
| 371 | cfg.swift:371:3:373:3 | func OptionalC.getOptional | 'func OptionalC.getOptional' |
310310
| 371 | cfg.swift:371:28:373:3 | Block | 'Block' |
311311
| 372 | cfg.swift:372:12:372:12 | c | 'c -^ ReturnExpr' |
312312
| 376 | cfg.swift:376:1:378:1 | func testOptional | 'func testOptional' |
@@ -320,7 +320,7 @@
320320
| 386 | cfg.swift:386:23:386:23 | t | 't -> Block' |
321321
| 387 | cfg.swift:387:10:387:10 | t | 't -^ ... .a -> t -^ ... .1 -^ ... + ... -> t -^ ... .c -^ ... + ... -> Argument -V 1 -> Argument -V 2 -> Argument -V 3 -^ TupleExpr -^ ... .0 -^ ... + ... -^ ReturnExpr' |
322322
| 390 | cfg.swift:390:1:394:1 | class Derived | 'class Derived -V Derived -> BaseType -V C' |
323-
| 391 | cfg.swift:391:3:393:3 | init | 'init' |
323+
| 391 | cfg.swift:391:3:393:3 | Derived.init | 'Derived.init' |
324324
| 391 | cfg.swift:391:10:393:3 | Block | 'Block' |
325325
| 392 | cfg.swift:392:5:392:9 | super | 'super -^ ... .init -> Argument -V 0 -^ ... .init(...)' |
326326
| 396 | cfg.swift:396:1:404:1 | func doWithoutCatch | 'func doWithoutCatch' |
@@ -333,8 +333,8 @@
333333
| 401 | cfg.swift:401:5:401:9 | print | 'print -> Argument -V "Still did not throw." -^ print(...)' |
334334
| 403 | cfg.swift:403:10:403:10 | 0 | '0 -^ ReturnExpr' |
335335
| 406 | cfg.swift:406:1:415:1 | class Structors | 'class Structors -V Structors' |
336-
| 407 | cfg.swift:407:3:407:16 | var field | 'var field -V field -> Int' |
337-
| 408 | cfg.swift:408:3:410:3 | init | 'init' |
336+
| 407 | cfg.swift:407:3:407:16 | var Structors.field | 'var Structors.field -V field -> Int' |
337+
| 408 | cfg.swift:408:3:410:3 | Structors.init | 'Structors.init' |
338338
| 408 | cfg.swift:408:10:410:3 | Block | 'Block' |
339339
| 409 | cfg.swift:409:5:409:9 | field | 'field -> 10 -^ ... = ...' |
340340
| 412 | cfg.swift:412:3:414:3 | DestructorDeclaration | 'DestructorDeclaration' |
@@ -346,26 +346,26 @@
346346
| 421 | cfg.swift:421:1:444:1 | func localDeclarations | 'func localDeclarations' |
347347
| 421 | cfg.swift:421:33:444:1 | Block | 'Block' |
348348
| 422 | cfg.swift:422:3:427:3 | class MyLocalClass | 'class MyLocalClass -V MyLocalClass' |
349-
| 423 | cfg.swift:423:5:423:14 | var x | 'var x -V x -> Int' |
350-
| 424 | cfg.swift:424:5:426:5 | init | 'init' |
349+
| 423 | cfg.swift:423:5:423:14 | var MyLocalClass.x | 'var MyLocalClass.x -V x -> Int' |
350+
| 424 | cfg.swift:424:5:426:5 | MyLocalClass.init | 'MyLocalClass.init' |
351351
| 424 | cfg.swift:424:12:426:5 | Block | 'Block' |
352352
| 425 | cfg.swift:425:7:425:7 | x | 'x -> 10 -^ ... = ...' |
353353
| 429 | cfg.swift:429:3:434:3 | struct MyLocalStruct | 'struct MyLocalStruct -V MyLocalStruct' |
354-
| 430 | cfg.swift:430:5:430:14 | var x | 'var x -V x -> Int' |
355-
| 431 | cfg.swift:431:5:433:5 | init | 'init' |
354+
| 430 | cfg.swift:430:5:430:14 | var MyLocalStruct.x | 'var MyLocalStruct.x -V x -> Int' |
355+
| 431 | cfg.swift:431:5:433:5 | MyLocalStruct.init | 'MyLocalStruct.init' |
356356
| 431 | cfg.swift:431:12:433:5 | Block | 'Block' |
357357
| 432 | cfg.swift:432:7:432:7 | x | 'x -> 10 -^ ... = ...' |
358358
| 436 | cfg.swift:436:3:439:3 | enum MyLocalEnum | 'enum MyLocalEnum -V MyLocalEnum' |
359-
| 437 | cfg.swift:437:10:437:10 | A | 'A -V A' |
360-
| 438 | cfg.swift:438:10:438:10 | B | 'B -V B' |
359+
| 437 | cfg.swift:437:10:437:10 | MyLocalEnum.A | 'MyLocalEnum.A -V A' |
360+
| 438 | cfg.swift:438:10:438:10 | MyLocalEnum.B | 'MyLocalEnum.B -V B' |
361361
| 441 | cfg.swift:441:3:441:22 | var myLocalVar | 'var myLocalVar -V myLocalVar -> Int' |
362362
| 443 | cfg.swift:443:10:443:10 | 0 | '0 -^ ReturnExpr' |
363363
| 446 | cfg.swift:446:1:448:1 | struct B | 'struct B -V B' |
364-
| 447 | cfg.swift:447:3:447:13 | var x | 'var x -V x -> Int' |
364+
| 447 | cfg.swift:447:3:447:13 | var B.x | 'var B.x -V x -> Int' |
365365
| 450 | cfg.swift:450:1:454:1 | struct A | 'struct A -V A' |
366-
| 451 | cfg.swift:451:3:451:11 | var b | 'var b -V b -> B' |
367-
| 452 | cfg.swift:452:3:452:14 | var bs | 'var bs -V bs -> Array -> B -^ GenericTypeExpr' |
368-
| 453 | cfg.swift:453:3:453:15 | var mayB | 'var mayB -V mayB -> Optional -> B -^ GenericTypeExpr' |
366+
| 451 | cfg.swift:451:3:451:11 | var A.b | 'var A.b -V b -> B' |
367+
| 452 | cfg.swift:452:3:452:14 | var A.bs | 'var A.bs -V bs -> Array -> B -^ GenericTypeExpr' |
368+
| 453 | cfg.swift:453:3:453:15 | var A.mayB | 'var A.mayB -V mayB -> Optional -> B -^ GenericTypeExpr' |
369369
| 456 | cfg.swift:456:1:466:1 | func test | 'func test' |
370370
| 456 | cfg.swift:456:11:456:11 | a | 'a -> Block' |
371371
| 457 | cfg.swift:457:3:457:24 | var kpGet_b_x | 'var kpGet_b_x -V kpGet_b_x -> ' |
@@ -437,9 +437,9 @@
437437
| 560 | cfg.swift:560:3:560:17 | usesAutoclosure | 'usesAutoclosure -> Argument -V 1 -^ usesAutoclosure(...)' |
438438
| 565 | cfg.swift:565:1:567:1 | protocol MyProtocol | 'protocol MyProtocol -V MyProtocol' |
439439
| 566 | cfg.swift:566:2:566:1 | Block | 'Block' |
440-
| 566 | cfg.swift:566:2:566:21 | func source | 'func source' |
440+
| 566 | cfg.swift:566:2:566:21 | func MyProtocol.source | 'func MyProtocol.source' |
441441
| 569 | cfg.swift:569:1:571:1 | class MyProcotolImpl | 'class MyProcotolImpl -V MyProcotolImpl -> BaseType -V MyProtocol' |
442-
| 570 | cfg.swift:570:2:570:34 | func source | 'func source' |
442+
| 570 | cfg.swift:570:2:570:34 | func MyProcotolImpl.source | 'func MyProcotolImpl.source' |
443443
| 570 | cfg.swift:570:23:570:34 | Block | 'Block -V 0 -^ ReturnExpr' |
444444
| 573 | cfg.swift:573:1:573:62 | func getMyProtocol | 'func getMyProtocol' |
445445
| 573 | cfg.swift:573:36:573:62 | Block | 'Block -V MyProcotolImpl -^ MyProcotolImpl(...) -^ ReturnExpr' |
@@ -464,7 +464,7 @@
464464
| 591 | cfg.swift:591:21:591:25 | Block | 'Block -V 1' |
465465
| 592 | cfg.swift:592:14:592:18 | Block | 'Block -V 2' |
466466
| 596 | cfg.swift:596:1:598:1 | struct ValueGenericsStruct | 'struct ValueGenericsStruct -V ValueGenericsStruct -> TypeParameter -V N -> Int' |
467-
| 597 | cfg.swift:597:5:597:13 | var x | 'var x -V x -> N' |
467+
| 597 | cfg.swift:597:5:597:13 | var ValueGenericsStruct.x | 'var ValueGenericsStruct.x -V x -> N' |
468468
| 600 | cfg.swift:600:1:604:1 | func valueGenericsFn | 'func valueGenericsFn' |
469469
| 600 | cfg.swift:600:36:600:40 | value | 'value -> Block' |
470470
| 601 | cfg.swift:601:5:601:13 | var x | 'var x -V x -> N' |

0 commit comments

Comments
 (0)