@@ -498,21 +498,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
498
498
)
499
499
}
500
500
501
- /**
502
- * Holds if flow from `p` to a return node of kind `kind` is allowed.
503
- *
504
- * We don't expect a parameter to return stored in itself, unless
505
- * explicitly allowed
506
- */
507
- bindingset [ p, kind]
508
- private predicate parameterFlowThroughAllowed ( ParamNodeEx p , ReturnKindExt kind ) {
509
- exists ( ParameterPosition pos | p .isParameterOf ( _, pos ) |
510
- not kind .( ParamUpdateReturnKind ) .getPosition ( ) = pos
511
- or
512
- allowParameterReturnInSelfEx ( p )
513
- )
514
- }
515
-
516
501
private module Stage1 implements StageSig {
517
502
class Ap = Unit ;
518
503
@@ -936,8 +921,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
936
921
throughFlowNodeCand ( p ) and
937
922
returnFlowCallableNodeCand ( c , kind ) and
938
923
p .getEnclosingCallable ( ) = c and
939
- exists ( ap ) and
940
- parameterFlowThroughAllowed ( p , kind )
924
+ exists ( ap )
941
925
)
942
926
}
943
927
@@ -2103,7 +2087,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
2103
2087
TSummaryCtxSome ( pragma [ only_bind_into ] ( p ) , _, _, pragma [ only_bind_into ] ( argAp ) , _) and
2104
2088
not outBarrier ( ret , state ) and
2105
2089
kind = ret .getKind ( ) and
2106
- parameterFlowThroughAllowed ( p , kind ) and
2107
2090
argApa = getApprox ( argAp ) and
2108
2091
PrevStage:: returnMayFlowThrough ( ret , pragma [ only_bind_into ] ( argApa ) , apa , kind )
2109
2092
)
@@ -2439,7 +2422,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
2439
2422
) {
2440
2423
revFlow ( pragma [ only_bind_into ] ( p ) , state , TReturnCtxMaybeFlowThrough ( pos ) ,
2441
2424
apSome ( returnAp ) , pragma [ only_bind_into ] ( ap ) ) and
2442
- parameterFlowThroughAllowed ( p , pos .getKind ( ) ) and
2443
2425
PrevStage:: parameterMayFlowThrough ( p , getApprox ( ap ) )
2444
2426
}
2445
2427
@@ -2525,8 +2507,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
2525
2507
private predicate parameterFlowsThroughRev (
2526
2508
ParamNodeEx p , Ap ap , ReturnPosition pos , Ap returnAp
2527
2509
) {
2528
- revFlow ( p , _, TReturnCtxMaybeFlowThrough ( pos ) , apSome ( returnAp ) , ap ) and
2529
- parameterFlowThroughAllowed ( p , pos .getKind ( ) )
2510
+ revFlow ( p , _, TReturnCtxMaybeFlowThrough ( pos ) , apSome ( returnAp ) , ap )
2530
2511
}
2531
2512
2532
2513
pragma [ nomagic]
0 commit comments