@@ -16,14 +16,20 @@ module Input implements InputSig<Location, DataFlowImplSpecific::SwiftDataFlow>
1616
1717 class SummarizedCallableBase = Function ;
1818
19- class SourceBase = Void ;
19+ class SourceBase extends Void {
20+ Location getLocation ( ) { none ( ) }
21+ }
2022
21- class SinkBase = Void ;
23+ class SinkBase = SourceBase ;
2224
23- class FlowSummaryCallBase = Void ;
25+ class FlowSummaryCallBase = SourceBase ;
2426
2527 predicate callableFromSource ( SummarizedCallableBase c ) { c .hasBody ( ) }
2628
29+ DataFlowCallable getSummarizedCallableAsDataFlowCallable ( SummarizedCallableBase c ) {
30+ result .asSummarizedCallable ( ) = c
31+ }
32+
2733 ArgumentPosition callbackSelfParameterPosition ( ) { result instanceof ThisArgumentPosition }
2834
2935 ReturnKind getStandardReturnValueKind ( ) { result instanceof NormalReturnKind }
@@ -114,18 +120,48 @@ module Input implements InputSig<Location, DataFlowImplSpecific::SwiftDataFlow>
114120
115121private import Make< Location , DataFlowImplSpecific:: SwiftDataFlow , Input > as Impl
116122
117- private module StepsInput implements Impl:: Private:: StepsInputSig {
118- Impl:: Private:: SummaryNode getSummaryNode ( Node n ) {
119- result = n .( FlowSummaryNode ) .getSummaryNode ( )
123+ private module Input2 implements Impl:: Private:: InputSig2 {
124+ private import codeql.util.Void
125+
126+ class SourceSinkReportingElement extends Void {
127+ Location getLocation ( ) { none ( ) }
128+
129+ DataFlowCallable getEnclosingCallable ( ) { none ( ) }
120130 }
121131
122- DataFlowCall getACall ( Public:: SummarizedCallable sc ) { result .asCall ( ) .getStaticTarget ( ) = sc }
132+ SourceSinkReportingElement getSourceEntryElement (
133+ Impl:: Public:: SourceElement source , Impl:: Private:: SummaryComponent sc
134+ ) {
135+ none ( )
136+ }
137+
138+ SourceSinkReportingElement getNextElement (
139+ SourceSinkReportingElement prev , Impl:: Private:: SummaryComponent sc
140+ ) {
141+ none ( )
142+ }
143+
144+ bindingset [ e, sc]
145+ Node getSourceExitNode ( SourceSinkReportingElement e , Impl:: Private:: SummaryComponent sc ) {
146+ none ( )
147+ }
148+
149+ SourceSinkReportingElement getSinkExitElement (
150+ Impl:: Public:: SinkElement sink , Impl:: Private:: SummaryComponent sc
151+ ) {
152+ none ( )
153+ }
123154
124- DataFlowCallable getSourceNodeEnclosingCallable ( Input:: SourceBase source ) { none ( ) }
155+ bindingset [ e, sc]
156+ Node getSinkEntryNode ( SourceSinkReportingElement e , Impl:: Private:: SummaryComponent sc ) { none ( ) }
157+ }
158+
159+ private import Impl:: Private:: Make2< Input2 > as Impl2
125160
126- Node getSourceNode ( Input:: SourceBase source , Impl:: Private:: SummaryComponentStack s ) { none ( ) }
161+ private module StepsInput implements Impl2:: StepsInputSig {
162+ Impl2:: SummaryNode getSummaryNode ( Node n ) { result = n .( FlowSummaryNode ) .getSummaryNode ( ) }
127163
128- Node getSinkNode ( Input :: SinkBase sink , Impl :: Private :: SummaryComponent sc ) { none ( ) }
164+ DataFlowCall getACall ( Public :: SummarizedCallable sc ) { result . asCall ( ) . getStaticTarget ( ) = sc }
129165}
130166
131167module SourceSinkInterpretationInput implements
@@ -252,8 +288,9 @@ module SourceSinkInterpretationInput implements
252288
253289module Private {
254290 import Impl:: Private
291+ import Impl2
255292
256- module Steps = Impl :: Private :: Steps< StepsInput > ;
293+ module Steps = Impl2 :: Steps< StepsInput > ;
257294
258295 module External {
259296 import Impl:: Private:: External
0 commit comments