@@ -312,18 +312,15 @@ class ConstantBooleanExprNode extends ArgumentNode, ExprNode {
312312cached
313313predicate isUnreachableInCall ( Node n , DataFlowCall call ) {
314314 exists (
315- ExplicitParameterNode paramNode , ConstantBooleanExprNode arg , BasicBlock bb ,
316- SsaImplicitInit varInit , Guard guard
315+ ExplicitParameterNode paramNode , ConstantBooleanExprNode arg , SsaImplicitInit param , Guard guard
317316 |
318- // get argument and parameter for this call
317+ // get constant bool argument and parameter for this call
319318 viableParamArg ( call , paramNode , arg ) and
320319 // get the ssa variable definition for this parameter
321- varInit .isParameterDefinition ( paramNode .getParameter ( ) ) and
320+ param .isParameterDefinition ( paramNode .getParameter ( ) ) and
322321 // which is used in a guard
323- varInit .getAUse ( ) = guard and
324- // which controls that bb is not active
325- guard .controls ( bb , arg .getBooleanValue ( ) .booleanNot ( ) ) and
326- // and the node we pass in is in this bb
327- bb .getANode ( ) = n .asExpr ( )
322+ param .getAUse ( ) = guard and
323+ // which controls `n` with the opposite value of `arg`
324+ guard .controls ( n .asExpr ( ) .getBasicBlock ( ) , arg .getBooleanValue ( ) .booleanNot ( ) )
328325 )
329326}
0 commit comments