11private import codeql.dataflow.DataFlow
22private import codeql.typetracking.TypeTracking as Tt
3+ private import codeql.util.Unit
34
45module MakeImplCommon< InputSig Lang> {
56 private import Lang
@@ -54,7 +55,10 @@ module MakeImplCommon<InputSig Lang> {
5455 override string toString ( ) { result = "FeatureEqualSourceSinkCallContext" }
5556 }
5657
57- signature predicate sourceNode ( Node n ) ;
58+ /**
59+ * Holds if `source` is a relevant data flow source.
60+ */
61+ signature predicate sourceNode ( Node source ) ;
5862
5963 /**
6064 * EXPERIMENTAL: This API is subject to change without notice.
@@ -86,8 +90,8 @@ module MakeImplCommon<InputSig Lang> {
8690 string toString ( ) { result = "Content" }
8791 }
8892
89- class ContentFilter extends Content {
90- Content getAMatchingContent ( ) { result = this }
93+ class ContentFilter extends Unit {
94+ Content getAMatchingContent ( ) { none ( ) }
9195 }
9296
9397 predicate compatibleContents ( Content storeContents , Content loadContents ) {
@@ -102,6 +106,7 @@ module MakeImplCommon<InputSig Lang> {
102106 argumentValueFlowsThrough ( n1 , TReadStepTypesNone ( ) , n2 )
103107 }
104108
109+ // TODO: support setters
105110 predicate storeStep ( Node n1 , Node n2 , Content f ) { storeSet ( n1 , f , n2 , _, _) }
106111
107112 predicate loadStep ( Node n1 , LocalSourceNode n2 , Content f ) {
@@ -720,7 +725,7 @@ module MakeImplCommon<InputSig Lang> {
720725 * If a read step was taken, then `read` captures the `Content`, the
721726 * container type, and the content type.
722727 */
723- pragma [ nomagic ]
728+ cached
724729 predicate argumentValueFlowsThrough ( ArgNode arg , ReadStepTypesOption read , Node out ) {
725730 exists ( DataFlowCall call , ReturnKind kind |
726731 argumentValueFlowsThrough0 ( call , arg , kind , read ) and
0 commit comments