File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
lib/codeql/swift/dataflow
test/library-tests/dataflow/flowsources Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -434,6 +434,11 @@ private Element interpretElement0(
434
434
subtypes = true and
435
435
decl .getNominalTypeDecl ( ) = nomTypeDecl .getADerivedTypeDecl * ( )
436
436
or
437
+ exists ( ExtensionDecl e | e .getExtendedTypeDecl ( ) = decl .getNominalTypeDecl ( ) |
438
+ subtypes = true and
439
+ e .getAProtocol ( ) = nomTypeDecl .getADerivedTypeDecl * ( )
440
+ )
441
+ or
437
442
subtypes = false and
438
443
decl .getNominalTypeDecl ( ) = nomTypeDecl
439
444
)
@@ -449,6 +454,11 @@ private Element interpretElement0(
449
454
subtypes = true and
450
455
decl .getNominalTypeDecl ( ) = nomTypeDecl .getADerivedTypeDecl * ( )
451
456
or
457
+ exists ( ExtensionDecl e | e .getExtendedTypeDecl ( ) = decl .getNominalTypeDecl ( ) |
458
+ subtypes = true and
459
+ e .getAProtocol ( ) = nomTypeDecl .getADerivedTypeDecl * ( )
460
+ )
461
+ or
452
462
subtypes = false and
453
463
decl .getNominalTypeDecl ( ) = nomTypeDecl
454
464
)
Original file line number Diff line number Diff line change 63
63
| generics.swift:93:9:93:15 | .source2 | external |
64
64
| generics.swift:112:9:112:15 | .source1 | external |
65
65
| generics.swift:113:9:113:15 | .source2 | external |
66
+ | generics.swift:114:9:114:14 | .source1 | external |
67
+ | generics.swift:115:9:115:14 | .source2 | external |
68
+ | generics.swift:116:9:116:15 | .source1 | external |
69
+ | generics.swift:117:9:117:15 | .source2 | external |
66
70
| nsdata.swift:18:17:18:40 | call to NSData.init(contentsOf:) | external |
67
71
| nsdata.swift:19:17:19:53 | call to NSData.init(contentsOf:options:) | external |
68
72
| string.swift:56:21:56:44 | call to String.init(contentsOf:) | external |
Original file line number Diff line number Diff line change @@ -111,8 +111,8 @@ extension MyImpl2 : MyProtocol2 {
111
111
func useProtocol2( proto: MyProtocol2 , impl: MyImpl2 < Int > , impl2: MyImpl2 < Any > ) {
112
112
_ = proto. source1 // SOURCE
113
113
_ = proto. source2 // SOURCE
114
- _ = impl. source1 // SOURCE [NOT DETECTED]
115
- _ = impl. source2 // SOURCE [NOT DETECTED]
116
- _ = impl2. source1 // SOURCE [NOT DETECTED]
117
- _ = impl2. source2 // SOURCE [NOT DETECTED]
114
+ _ = impl. source1 // SOURCE
115
+ _ = impl. source2 // SOURCE
116
+ _ = impl2. source1 // SOURCE
117
+ _ = impl2. source2 // SOURCE
118
118
}
You can’t perform that action at this time.
0 commit comments