@@ -27,14 +27,20 @@ module Input implements InputSig<Location, DataFlowImplSpecific::GoDataFlow> {
2727
2828 class SummarizedCallableBase = Callable ;
2929
30- class SourceBase = Void ;
30+ class SourceBase extends Void {
31+ Location getLocation ( ) { none ( ) }
32+ }
3133
32- class SinkBase = Void ;
34+ class SinkBase = SourceBase ;
3335
34- class FlowSummaryCallBase = Void ;
36+ class FlowSummaryCallBase = SourceBase ;
3537
3638 predicate callableFromSource ( SummarizedCallableBase c ) { exists ( c .getFuncDef ( ) ) }
3739
40+ DataFlowCallable getSummarizedCallableAsDataFlowCallable ( SummarizedCallableBase c ) {
41+ result .asSummarizedCallable ( ) = c
42+ }
43+
3844 predicate neutralElement (
3945 Input:: SummarizedCallableBase c , string kind , string provenance , boolean isExact
4046 ) {
@@ -114,23 +120,29 @@ module Input implements InputSig<Location, DataFlowImplSpecific::GoDataFlow> {
114120
115121private import Make< Location , DataFlowImplSpecific:: GoDataFlow , 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 ( ) }
130+
131+ SourceSinkReportingElement getASuccessor ( Impl:: Private:: SummaryComponent sc ) { none ( ) }
120132 }
133+ }
134+
135+ private import Impl:: Private:: Make2< Input2 > as Impl2
136+
137+ private module StepsInput implements Impl2:: StepsInputSig {
138+ Impl2:: SummaryNode getSummaryNode ( Node n ) { result = n .( FlowSummaryNode ) .getSummaryNode ( ) }
121139
122140 DataFlowCall getACall ( Public:: SummarizedCallable sc ) {
123141 exists ( DataFlow:: CallNode call |
124142 call .asExpr ( ) = result and
125143 call .getACalleeIncludingExternals ( ) = sc
126144 )
127145 }
128-
129- DataFlowCallable getSourceNodeEnclosingCallable ( Input:: SourceBase source ) { none ( ) }
130-
131- Node getSourceNode ( Input:: SourceBase source , Impl:: Private:: SummaryComponentStack s ) { none ( ) }
132-
133- Node getSinkNode ( Input:: SinkBase sink , Impl:: Private:: SummaryComponent sc ) { none ( ) }
134146}
135147
136148module SourceSinkInterpretationInput implements
@@ -500,8 +512,9 @@ private predicate parseReturn(AccessPath::AccessPathTokenBase c, int n) {
500512
501513module Private {
502514 import Impl:: Private
515+ import Impl2
503516
504- module Steps = Impl :: Private :: Steps< StepsInput > ;
517+ module Steps = Impl2 :: Steps< StepsInput > ;
505518
506519 module External {
507520 import Impl:: Private:: External
0 commit comments