File tree Expand file tree Collapse file tree
lib/codeql/swift/dataflow
test/library-tests/dataflow/flowsources Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -434,6 +434,11 @@ private Element interpretElement0(
434434 subtypes = true and
435435 decl .getNominalTypeDecl ( ) = nomTypeDecl .getADerivedTypeDecl * ( )
436436 or
437+ exists ( ExtensionDecl e | e .getExtendedTypeDecl ( ) = decl .getNominalTypeDecl ( ) |
438+ subtypes = true and
439+ e .getAProtocol ( ) = nomTypeDecl .getADerivedTypeDecl * ( )
440+ )
441+ or
437442 subtypes = false and
438443 decl .getNominalTypeDecl ( ) = nomTypeDecl
439444 )
@@ -449,6 +454,11 @@ private Element interpretElement0(
449454 subtypes = true and
450455 decl .getNominalTypeDecl ( ) = nomTypeDecl .getADerivedTypeDecl * ( )
451456 or
457+ exists ( ExtensionDecl e | e .getExtendedTypeDecl ( ) = decl .getNominalTypeDecl ( ) |
458+ subtypes = true and
459+ e .getAProtocol ( ) = nomTypeDecl .getADerivedTypeDecl * ( )
460+ )
461+ or
452462 subtypes = false and
453463 decl .getNominalTypeDecl ( ) = nomTypeDecl
454464 )
Original file line number Diff line number Diff line change 6363| generics.swift:93:9:93:15 | .source2 | external |
6464| generics.swift:112:9:112:15 | .source1 | external |
6565| 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 |
6670| nsdata.swift:18:17:18:40 | call to NSData.init(contentsOf:) | external |
6771| nsdata.swift:19:17:19:53 | call to NSData.init(contentsOf:options:) | external |
6872| 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 {
111111func useProtocol2( proto: MyProtocol2 , impl: MyImpl2 < Int > , impl2: MyImpl2 < Any > ) {
112112 _ = proto. source1 // SOURCE
113113 _ = 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
118118}
You can’t perform that action at this time.
0 commit comments