mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
also deprecate the definitionReaches predicate, it was only used in a test
This commit is contained in:
@@ -249,8 +249,9 @@ class VarUse extends ControlFlowNode, @varref {
|
||||
/**
|
||||
* Holds if the definition of `v` in `def` reaches `use` along some control flow path
|
||||
* without crossing another definition of `v`.
|
||||
* DEPRECATED: Use the `SSA.qll` library instead.
|
||||
*/
|
||||
predicate definitionReaches(Variable v, VarDef def, VarUse use) {
|
||||
deprecated predicate definitionReaches(Variable v, VarDef def, VarUse use) {
|
||||
v = use.getVariable() and
|
||||
exists(BasicBlock bb, int i, int next | next = nextDefAfter(bb, v, i, def) |
|
||||
exists(int j | j in [i + 1 .. next - 1] | bb.useAt(j, v, use))
|
||||
@@ -286,7 +287,7 @@ deprecated private SsaDefinition getAPseudoDefinitionInput(SsaDefinition nd) {
|
||||
* Holds if `d` is a definition of `v` at index `i` in `bb`, and the result is the next index
|
||||
* in `bb` after `i` at which the same variable is defined, or `bb.length()` if there is none.
|
||||
*/
|
||||
private int nextDefAfter(BasicBlock bb, Variable v, int i, VarDef d) {
|
||||
deprecated private int nextDefAfter(BasicBlock bb, Variable v, int i, VarDef d) {
|
||||
bb.defAt(i, v, d) and
|
||||
result =
|
||||
min(int jj |
|
||||
|
||||
Reference in New Issue
Block a user