File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
lib/codeql/swift/dataflow
test/library-tests/dataflow/flowsources Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,9 @@ private Element interpretElement0(
434
434
subtypes = true and
435
435
declWithMethod .getNominalTypeDecl ( ) = namedTypeDecl .getADerivedTypeDecl * ( )
436
436
or
437
- exists ( ExtensionDecl e | e .getExtendedTypeDecl ( ) = declWithMethod .getNominalTypeDecl ( ) |
437
+ exists ( ExtensionDecl e |
438
+ e .getExtendedTypeDecl ( ) .getADerivedTypeDecl * ( ) = declWithMethod .getNominalTypeDecl ( )
439
+ |
438
440
subtypes = true and
439
441
e .getAProtocol ( ) = namedTypeDecl .getADerivedTypeDecl * ( )
440
442
)
@@ -454,7 +456,9 @@ private Element interpretElement0(
454
456
subtypes = true and
455
457
declWithField .getNominalTypeDecl ( ) = namedTypeDecl .getADerivedTypeDecl * ( )
456
458
or
457
- exists ( ExtensionDecl e | e .getExtendedTypeDecl ( ) = declWithField .getNominalTypeDecl ( ) |
459
+ exists ( ExtensionDecl e |
460
+ e .getExtendedTypeDecl ( ) .getADerivedTypeDecl * ( ) = declWithField .getNominalTypeDecl ( )
461
+ |
458
462
subtypes = true and
459
463
e .getAProtocol ( ) = namedTypeDecl .getADerivedTypeDecl * ( )
460
464
)
Original file line number Diff line number Diff line change 74
74
| generics.swift:132:9:132:15 | .source1 | external |
75
75
| generics.swift:133:9:133:15 | .source2 | external |
76
76
| generics.swift:162:9:162:22 | call to source2() | external |
77
+ | generics.swift:163:9:163:22 | call to source3() | external |
77
78
| nsdata.swift:18:17:18:40 | call to NSData.init(contentsOf:) | external |
78
79
| nsdata.swift:19:17:19:53 | call to NSData.init(contentsOf:options:) | external |
79
80
| string.swift:56:21:56:44 | call to String.init(contentsOf:) | external |
Original file line number Diff line number Diff line change @@ -160,5 +160,5 @@ class MyChildClass3: MyClass3 {
160
160
func useProtocol3( impl: MyChildClass3 ) {
161
161
_ = impl. source1 ( ) // not a source (`MyProtocol3.source1` is the declared source and `MyParentClass3` doesn't extend it)
162
162
_ = impl. source2 ( ) // SOURCE
163
- _ = impl. source3 ( ) // SOURCE [NOT DETECTED]
163
+ _ = impl. source3 ( ) // SOURCE
164
164
}
You can’t perform that action at this time.
0 commit comments