C#: Deprecate controlsBlock.

This commit is contained in:
Anders Schack-Mulligen
2025-10-31 14:22:11 +01:00
parent 4de564eb4e
commit eb93e8ed41

View File

@@ -88,6 +88,8 @@ class ControlFlowElement extends ExprOrStmtParent, @control_flow_element {
}
/**
* DEPRECATED: Use `Guard` class instead.
*
* 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
@@ -96,7 +98,9 @@ class ControlFlowElement extends ExprOrStmtParent, @control_flow_element {
* `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) {
deprecated predicate controlsBlock(
BasicBlock controlled, ConditionalSuccessor s, ConditionBlock cb
) {
cb.getLastNode() = this.getAControlFlowNode() and
cb.edgeDominates(controlled, s)
}