Skip to content

Commit

Permalink
Shared: Tweak basic block documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
paldepind committed Jan 23, 2025
1 parent 9547a5c commit a537f34
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions shared/controlflow/codeql/controlflow/BasicBlock.qll
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,17 @@ module Make<LocationSig Location, InputSig<Location> 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.
Expand Down

0 comments on commit a537f34

Please sign in to comment.