diff --git a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll index 49b7e0c8b6d..5a0c561dc3f 100644 --- a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll +++ b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll @@ -240,7 +240,7 @@ private class GuardConditionFromIR extends GuardCondition { */ private predicate controlsBlock(BasicBlock controlled, boolean testIsTrue) { exists(IRBlock irb | - forex(IRGuardCondition inst | inst = ir | inst.controls(irb, testIsTrue)) and + ir.controls(irb, testIsTrue) and irb.getAnInstruction().getAst().(ControlFlowNode).getBasicBlock() = controlled and not isUnreachedBlock(irb) )