Skip to content

Commit 8c7431c

Browse files
committed
C++: Put {true,false}cond_base back as deprecated predicates for now
1 parent c980ccf commit 8c7431c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

cpp/ql/src/semmle/code/cpp/controlflow/ControlFlowGraph.qll

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,24 @@ import ControlFlowGraphPublic
9494
*/
9595
class ControlFlowNodeBase extends ElementBase, @cfgnode { }
9696

97+
/**
98+
* DEPRECATED: Use `ControlFlowNode.getATrueSuccessor()` instead.
99+
* Holds when `n2` is a control-flow node such that the control-flow
100+
* edge `(n1, n2)` may be taken when `n1` is an expression that is true.
101+
*/
102+
deprecated predicate truecond_base(ControlFlowNodeBase n1, ControlFlowNodeBase n2) {
103+
qlCFGTrueSuccessor(n1, n2)
104+
}
105+
106+
/**
107+
* DEPRECATED: Use `ControlFlowNode.getAFalseSuccessor()` instead.
108+
* Holds when `n2` is a control-flow node such that the control-flow
109+
* edge `(n1, n2)` may be taken when `n1` is an expression that is false.
110+
*/
111+
deprecated predicate falsecond_base(ControlFlowNodeBase n1, ControlFlowNodeBase n2) {
112+
qlCFGFalseSuccessor(n1, n2)
113+
}
114+
97115
/**
98116
* An abstract class that can be extended to add additional edges to the
99117
* control-flow graph. Instances of this class correspond to the source nodes

0 commit comments

Comments
 (0)