Skip to content

Commit

Permalink
C#/Ruby/Swift: Tweaks to documentation
Browse files Browse the repository at this point in the history
Co-authored-by: Anders Schack-Mulligen <[email protected]>
  • Loading branch information
paldepind and aschackmull authored Feb 11, 2025
1 parent 8eadd11 commit d6e8acd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions csharp/ql/lib/semmle/code/csharp/controlflow/BasicBlocks.qll
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ final class BasicBlock extends BasicBlocksImpl::BasicBlock {
*
* Edge dominance is similar to node dominance except it concerns edges
* instead of nodes: A basic block is dominated by a _basic block_ `bb` if it
* can only be reached through `bb` and dominated by an _edge_ `s` if it can
* only be reached through `s`.
* can only be reached through `bb` and dominated by an _edge_ `e` if it can
* only be reached through `e`.
*
* Note that where all basic blocks (except the entry basic block) are
* strictly dominated by at least one basic block, a basic block may not be
Expand Down
8 changes: 4 additions & 4 deletions shared/controlflow/codeql/controlflow/BasicBlock.qll
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,17 @@ module Make<LocationSig Location, InputSig<Location> Input> {
predicate dominatingEdge(BasicBlock bb1, BasicBlock bb2) {
bb1.getASuccessor(_) = bb2 and
bbIDominates(bb1, bb2) and
// The above is not sufficient to ensure that `bb1` can only be reached
// The above is not sufficient to ensure that `bb2` can only be reached
// through `(bb1, bb2)`. To see why, consider this example corresponding to
// an `if` statement without an `else` block and whe `A` is the basic block
// an `if` statement without an `else` block where `A` is the basic block
// following the `if` statement:
// ```
// ... --> cond --[true]--> ... --> A
// \ /
// \ ^
// ----[false]-----------
// ```
// 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
// is immediately dominated by `cond`, but `A` is not dominated by the
// `false` edge since it is also possible to reach `A` via the `true`
// edge.
//
Expand Down

0 comments on commit d6e8acd

Please sign in to comment.