Skip to content

Commit d6e8acd

Browse files
C#/Ruby/Swift: Tweaks to documentation
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent 8eadd11 commit d6e8acd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

csharp/ql/lib/semmle/code/csharp/controlflow/BasicBlocks.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ final class BasicBlock extends BasicBlocksImpl::BasicBlock {
211211
*
212212
* Edge dominance is similar to node dominance except it concerns edges
213213
* instead of nodes: A basic block is dominated by a _basic block_ `bb` if it
214-
* can only be reached through `bb` and dominated by an _edge_ `s` if it can
215-
* only be reached through `s`.
214+
* can only be reached through `bb` and dominated by an _edge_ `e` if it can
215+
* only be reached through `e`.
216216
*
217217
* Note that where all basic blocks (except the entry basic block) are
218218
* strictly dominated by at least one basic block, a basic block may not be

shared/controlflow/codeql/controlflow/BasicBlock.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,17 +264,17 @@ module Make<LocationSig Location, InputSig<Location> Input> {
264264
predicate dominatingEdge(BasicBlock bb1, BasicBlock bb2) {
265265
bb1.getASuccessor(_) = bb2 and
266266
bbIDominates(bb1, bb2) and
267-
// The above is not sufficient to ensure that `bb1` can only be reached
267+
// The above is not sufficient to ensure that `bb2` can only be reached
268268
// through `(bb1, bb2)`. To see why, consider this example corresponding to
269-
// an `if` statement without an `else` block and whe `A` is the basic block
269+
// an `if` statement without an `else` block where `A` is the basic block
270270
// following the `if` statement:
271271
// ```
272272
// ... --> cond --[true]--> ... --> A
273-
// \ /
273+
// \ ^
274274
// ----[false]-----------
275275
// ```
276276
// Here `A` is a direct successor of `cond` along the `false` edge and it
277-
// is immediately dominated by `cond`, but `A` is not controlled by the
277+
// is immediately dominated by `cond`, but `A` is not dominated by the
278278
// `false` edge since it is also possible to reach `A` via the `true`
279279
// edge.
280280
//

0 commit comments

Comments
 (0)