Skip to content

Commit bb44141

Browse files
committed
Add QLDoc for succ0
1 parent 032574f commit bb44141

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

go/ql/lib/semmle/go/controlflow/ControlFlowGraphImpl.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,13 +623,18 @@ module CFG {
623623
not cmpl.isNormal()
624624
}
625625

626+
/**
627+
* Holds if `succ` is a successor of `pred`, ignoring the execution of any
628+
* deferred functions when a function ends.
629+
*/
626630
predicate succ0(ControlFlow::Node pred, ControlFlow::Node succ) {
627631
exists(int i |
628632
lastNode(this.getChildTreeRanked(i), pred, normalCompletion()) and
629633
firstNode(this.getChildTreeRanked(i + 1), succ)
630634
)
631635
}
632636

637+
/** Holds if `succ` is a successor of `pred`. */
633638
predicate succ(ControlFlow::Node pred, ControlFlow::Node succ) { this.succ0(pred, succ) }
634639

635640
final ControlFlowTree getChildTreeRanked(int i) {
@@ -2080,7 +2085,10 @@ module CFG {
20802085
)
20812086
}
20822087

2083-
/** Gets a successor of `nd`, that is, a node that is executed after `nd`. */
2088+
/**
2089+
* Gets a successor of `nd`, that is, a node that is executed after `nd`,
2090+
* ignoring the execution of any deferred functions when a function ends.
2091+
*/
20842092
cached
20852093
private ControlFlow::Node succ0(ControlFlow::Node nd) {
20862094
any(ControlFlowTree tree).succ0(nd, result)

0 commit comments

Comments
 (0)