From c7ccfac93805b1091f415fe83f83ef7c399684bb Mon Sep 17 00:00:00 2001 From: Alex Eyers-Taylor Date: Mon, 18 Sep 2023 10:51:48 +0100 Subject: [PATCH] CPP: Simplify some code in IRGuards. --- cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) )