From a537f347d3b0618f33e000558ca465b8c1fcfeb6 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Thu, 23 Jan 2025 17:21:46 +0100 Subject: [PATCH] Shared: Tweak basic block documentation --- .../controlflow/codeql/controlflow/BasicBlock.qll | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shared/controlflow/codeql/controlflow/BasicBlock.qll b/shared/controlflow/codeql/controlflow/BasicBlock.qll index 883e36b2ef16..57f6a310d182 100644 --- a/shared/controlflow/codeql/controlflow/BasicBlock.qll +++ b/shared/controlflow/codeql/controlflow/BasicBlock.qll @@ -182,17 +182,17 @@ module Make Input> { bbIDominates(this, succ) and // The above is not sufficient to ensure that `succ` can only be reached // through `s`. To see why, consider this example corresponding to an - // `if` expression without an `else` block: + // `if` statement without an `else` block and whe `A` is the basic block + // following the `if` statement: // ``` - // ... --> cond --[true]--> ... --> if expr + // ... --> cond --[true]--> ... --> A // \ / // ----[false]----------- // ``` - // The basic block for `cond` immediately dominates the directly - // succeeding basic block for the `if` expression. But the `if` - // expression is not immediately controlled by the `cond` basic block and - // the `false` edge since it is also possible to reach the `if` - // expression via the `true` edge. + // Here `A` is a direct successor of `cond` along the `false` edge and it + // is immediately dominated by `cond`, but `A` is not controlled by the + // `false` edge since it is also possible to reach `A` via the `true` + // edge. // // Note that the first and third conjunct implies the second. But // explicitly including the second conjunct leads to a better join order.