Skip to content

Commit eb93e8e

Browse files
committed
C#: Deprecate controlsBlock.
1 parent 4de564e commit eb93e8e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class ControlFlowElement extends ExprOrStmtParent, @control_flow_element {
8888
}
8989

9090
/**
91+
* DEPRECATED: Use `Guard` class instead.
92+
*
9193
* Holds if basic block `controlled` is controlled by this control flow element
9294
* with conditional value `s`. That is, `controlled` can only be reached from
9395
* 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 {
9698
* `cb` records all of the possible condition blocks for this control flow element
9799
* that a path from the callable entry point to `controlled` may go through.
98100
*/
99-
predicate controlsBlock(BasicBlock controlled, ConditionalSuccessor s, ConditionBlock cb) {
101+
deprecated predicate controlsBlock(
102+
BasicBlock controlled, ConditionalSuccessor s, ConditionBlock cb
103+
) {
100104
cb.getLastNode() = this.getAControlFlowNode() and
101105
cb.edgeDominates(controlled, s)
102106
}

0 commit comments

Comments
 (0)