@@ -386,34 +386,35 @@ module MakeStateBarrierGuard<
386386 */
387387 private class BarrierGuardFunction extends FinalFunction {
388388 DataFlow:: ParameterNode sanitizedParameter ;
389- BarrierGuard guard ;
390389 boolean guardOutcome ;
391390 FlowState state ;
392391 int paramIndex ;
393392
394393 BarrierGuardFunction ( ) {
395- barrierGuardIsRelevant ( guard ) and
396- exists ( Expr e |
397- exists ( Expr returnExpr |
398- returnExpr = guard .asExpr ( )
399- or
400- // ad hoc support for conjunctions:
401- getALogicalAndParent ( guard ) = returnExpr and guardOutcome = true
402- or
403- // ad hoc support for disjunctions:
404- getALogicalOrParent ( guard ) = returnExpr and guardOutcome = false
405- |
406- exists ( SsaExplicitDefinition ssa |
407- ssa .getDef ( ) .getSource ( ) = returnExpr and
408- ssa .getVariable ( ) .getAUse ( ) = this .getAReturnedExpr ( )
409- )
410- or
411- returnExpr = this .getAReturnedExpr ( )
394+ exists ( BarrierGuard guard |
395+ barrierGuardIsRelevant ( guard ) and
396+ exists ( Expr e |
397+ exists ( Expr returnExpr |
398+ returnExpr = guard .asExpr ( )
399+ or
400+ // ad hoc support for conjunctions:
401+ getALogicalAndParent ( guard ) = returnExpr and guardOutcome = true
402+ or
403+ // ad hoc support for disjunctions:
404+ getALogicalOrParent ( guard ) = returnExpr and guardOutcome = false
405+ |
406+ exists ( SsaExplicitDefinition ssa |
407+ ssa .getDef ( ) .getSource ( ) = returnExpr and
408+ ssa .getVariable ( ) .getAUse ( ) = this .getAReturnedExpr ( )
409+ )
410+ or
411+ returnExpr = this .getAReturnedExpr ( )
412+ ) and
413+ sanitizedParameter .flowsToExpr ( e ) and
414+ barrierGuardBlocksExpr ( guard , guardOutcome , e , state )
412415 ) and
413- sanitizedParameter .flowsToExpr ( e ) and
414- barrierGuardBlocksExpr ( guard , guardOutcome , e , state )
415- ) and
416- sanitizedParameter .getParameter ( ) = this .getParameter ( paramIndex )
416+ sanitizedParameter .getParameter ( ) = this .getParameter ( paramIndex )
417+ )
417418 }
418419
419420 /**
0 commit comments