@@ -915,6 +915,17 @@ private module Cached {
915915 TDataFlowCallNone ( ) or
916916 TDataFlowCallSome ( DataFlowCall call )
917917
918+ cached
919+ newtype TParamNodeOption =
920+ TParamNodeNone ( ) or
921+ TParamNodeSome ( ParamNode p )
922+
923+ cached
924+ newtype TReturnCtx =
925+ TReturnCtxNone ( ) or
926+ TReturnCtxNoFlowThrough ( ) or
927+ TReturnCtxMaybeFlowThrough ( ReturnPosition pos )
928+
918929 cached
919930 newtype TTypedContent = MkTypedContent ( Content c , DataFlowType t ) { store ( _, c , _, _, t ) }
920931
@@ -1304,6 +1315,44 @@ class DataFlowCallOption extends TDataFlowCallOption {
13041315 }
13051316}
13061317
1318+ /** An optional `ParamNode`. */
1319+ class ParamNodeOption extends TParamNodeOption {
1320+ string toString ( ) {
1321+ this = TParamNodeNone ( ) and
1322+ result = "(none)"
1323+ or
1324+ exists ( ParamNode p |
1325+ this = TParamNodeSome ( p ) and
1326+ result = p .toString ( )
1327+ )
1328+ }
1329+ }
1330+
1331+ /**
1332+ * A return context used to calculate flow summaries in reverse flow.
1333+ *
1334+ * The possible values are:
1335+ *
1336+ * - `TReturnCtxNone()`: no return flow.
1337+ * - `TReturnCtxNoFlowThrough()`: return flow, but flow through is not possible.
1338+ * - `TReturnCtxMaybeFlowThrough(ReturnPosition pos)`: return flow, of kind `pos`, and
1339+ * flow through may be possible.
1340+ */
1341+ class ReturnCtx extends TReturnCtx {
1342+ string toString ( ) {
1343+ this = TReturnCtxNone ( ) and
1344+ result = "(none)"
1345+ or
1346+ this = TReturnCtxNoFlowThrough ( ) and
1347+ result = "(no flow through)"
1348+ or
1349+ exists ( ReturnPosition pos |
1350+ this = TReturnCtxMaybeFlowThrough ( pos ) and
1351+ result = pos .toString ( )
1352+ )
1353+ }
1354+ }
1355+
13071356/** A `Content` tagged with the type of a containing object. */
13081357class TypedContent extends MkTypedContent {
13091358 private Content c ;
0 commit comments