@@ -202,13 +202,13 @@ module Node {
202
202
}
203
203
204
204
/** Holds is this node is a source node of kind `kind`. */
205
- predicate isSource ( string kind ) {
206
- this .getSummaryNode ( ) .( FlowSummaryImpl:: Private:: SourceOutputNode ) .isEntry ( kind )
205
+ predicate isSource ( string kind , string model ) {
206
+ this .getSummaryNode ( ) .( FlowSummaryImpl:: Private:: SourceOutputNode ) .isEntry ( kind , model )
207
207
}
208
208
209
209
/** Holds is this node is a sink node of kind `kind`. */
210
- predicate isSink ( string kind ) {
211
- this .getSummaryNode ( ) .( FlowSummaryImpl:: Private:: SinkInputNode ) .isExit ( kind )
210
+ predicate isSink ( string kind , string model ) {
211
+ this .getSummaryNode ( ) .( FlowSummaryImpl:: Private:: SinkInputNode ) .isExit ( kind , model )
212
212
}
213
213
214
214
override CfgScope getCfgScope ( ) {
@@ -1305,9 +1305,13 @@ module RustDataFlow implements InputSig<Location> {
1305
1305
/** Extra data flow steps needed for lambda flow analysis. */
1306
1306
predicate additionalLambdaFlowStep ( Node nodeFrom , Node nodeTo , boolean preservesValue ) { none ( ) }
1307
1307
1308
- predicate knownSourceModel ( Node source , string model ) { none ( ) }
1308
+ predicate knownSourceModel ( Node source , string model ) {
1309
+ source .( Node:: FlowSummaryNode ) .isSource ( _, model )
1310
+ }
1309
1311
1310
- predicate knownSinkModel ( Node sink , string model ) { none ( ) }
1312
+ predicate knownSinkModel ( Node sink , string model ) {
1313
+ sink .( Node:: FlowSummaryNode ) .isSink ( _, model )
1314
+ }
1311
1315
1312
1316
class DataFlowSecondLevelScope = Void ;
1313
1317
}
@@ -1575,11 +1579,11 @@ private module Cached {
1575
1579
1576
1580
/** Holds if `n` is a flow source of kind `kind`. */
1577
1581
cached
1578
- predicate sourceNode ( Node n , string kind ) { n .( Node:: FlowSummaryNode ) .isSource ( kind ) }
1582
+ predicate sourceNode ( Node n , string kind ) { n .( Node:: FlowSummaryNode ) .isSource ( kind , _ ) }
1579
1583
1580
1584
/** Holds if `n` is a flow sink of kind `kind`. */
1581
1585
cached
1582
- predicate sinkNode ( Node n , string kind ) { n .( Node:: FlowSummaryNode ) .isSink ( kind ) }
1586
+ predicate sinkNode ( Node n , string kind ) { n .( Node:: FlowSummaryNode ) .isSink ( kind , _ ) }
1583
1587
}
1584
1588
1585
1589
import Cached
0 commit comments