CodeQL library for C#
codeql/csharp-all 0.9.2-dev (changelog, source)
Search

Member predicate ControlFlowElement::controlsBlock

Holds if basic block controlled is controlled by this control flow element with conditional value s. That is, controlled can only be reached from the callable entry point by going via the s edge out of some basic block ending with this element.

This predicate is different from

exists(ConditionBlock cb |
  cb.getLastNode() = this.getAControlFlowNode() |
  cb.controls(controlled, s)
)

as control flow splitting is taken into account.

cb records all of the possible condition blocks for this control flow element that a path from the callable entry point to controlled may go through.

predicate controlsBlock(BasicBlock controlled, ConditionalSuccessor s, ConditionBlock cb)