@@ -249,8 +249,9 @@ class VarUse extends ControlFlowNode, @varref {
249249/**
250250 * Holds if the definition of `v` in `def` reaches `use` along some control flow path
251251 * without crossing another definition of `v`.
252+ * DEPRECATED: Use the `SSA.qll` library instead.
252253 */
253- predicate definitionReaches ( Variable v , VarDef def , VarUse use ) {
254+ deprecated predicate definitionReaches ( Variable v , VarDef def , VarUse use ) {
254255 v = use .getVariable ( ) and
255256 exists ( BasicBlock bb , int i , int next | next = nextDefAfter ( bb , v , i , def ) |
256257 exists ( int j | j in [ i + 1 .. next - 1 ] | bb .useAt ( j , v , use ) )
@@ -265,24 +266,28 @@ predicate definitionReaches(Variable v, VarDef def, VarUse use) {
265266/**
266267 * Holds if the definition of local variable `v` in `def` reaches `use` along some control flow path
267268 * without crossing another definition of `v`.
269+ * DEPRECATED: Use the `SSA.qll` library instead.
268270 */
269- predicate localDefinitionReaches ( LocalVariable v , VarDef def , VarUse use ) {
271+ deprecated predicate localDefinitionReaches ( LocalVariable v , VarDef def , VarUse use ) {
270272 exists ( SsaExplicitDefinition ssa |
271273 ssa .defines ( def , v ) and
272274 ssa = getAPseudoDefinitionInput * ( use .getSsaVariable ( ) .getDefinition ( ) )
273275 )
274276}
275277
276- /** Holds if `nd` is a pseudo-definition and the result is one of its inputs. */
277- private SsaDefinition getAPseudoDefinitionInput ( SsaDefinition nd ) {
278+ /**
279+ * Holds if `nd` is a pseudo-definition and the result is one of its inputs.
280+ * DEPRECATED: Use the `SSA.qll` library instead.
281+ */
282+ deprecated private SsaDefinition getAPseudoDefinitionInput ( SsaDefinition nd ) {
278283 result = nd .( SsaPseudoDefinition ) .getAnInput ( )
279284}
280285
281286/**
282287 * Holds if `d` is a definition of `v` at index `i` in `bb`, and the result is the next index
283288 * in `bb` after `i` at which the same variable is defined, or `bb.length()` if there is none.
284289 */
285- private int nextDefAfter ( BasicBlock bb , Variable v , int i , VarDef d ) {
290+ deprecated private int nextDefAfter ( BasicBlock bb , Variable v , int i , VarDef d ) {
286291 bb .defAt ( i , v , d ) and
287292 result =
288293 min ( int jj |
@@ -296,8 +301,9 @@ private int nextDefAfter(BasicBlock bb, Variable v, int i, VarDef d) {
296301 *
297302 * This is the case if there is a path from `earlier` to `later` that does not cross
298303 * another definition of `v`.
304+ * DEPRECATED: Use the `SSA.qll` library instead.
299305 */
300- predicate localDefinitionOverwrites ( LocalVariable v , VarDef earlier , VarDef later ) {
306+ deprecated predicate localDefinitionOverwrites ( LocalVariable v , VarDef earlier , VarDef later ) {
301307 exists ( BasicBlock bb , int i , int next | next = nextDefAfter ( bb , v , i , earlier ) |
302308 bb .defAt ( next , v , later )
303309 or
0 commit comments