File tree Expand file tree Collapse file tree
go/ql/lib/semmle/go/dataflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,6 +138,8 @@ private predicate iDomEffect(
138138 * dominator of `node` and no side-effects can occur between `result` and
139139 * `node`.
140140 *
141+ * `entry` is the entry node for the function containing `node` and `result`.
142+ *
141143 * `sideEffectCFG` has an edge from the function entry to every node with a
142144 * side-effect. This means that every node with a side-effect has the
143145 * function entry as its immediate dominator. So if node `x` dominates node
@@ -181,6 +183,10 @@ private predicate iDomEffect(
181183 *
182184 * The immediate dominator path to line 015 is 000 - 009 - 012 - 015.
183185 * Therefore, the most recent side effect for line 015 is line 009.
186+ * (Note that line 009 is not a side-effect itself. Instead, it is the
187+ * point where the control flow paths from the side-effects at 004 and 007
188+ * merge. Because its immediate dominator is the entry node 000, it serves
189+ * as the safe root for expressions evaluated after those side-effects.)
184190 */
185191private ControlFlow:: Node mostRecentSideEffect ( ControlFlow:: Node entry , ControlFlow:: Node node ) {
186192 iDomEffect ( entry , entry , result ) and
You can’t perform that action at this time.
0 commit comments