Skip to content

Commit 994c1f6

Browse files
committed
Java: Add hasInputFromBlock predicate in BaseSSA.
1 parent a0c8491 commit 994c1f6

File tree

1 file changed

+6
-1
lines changed
  • java/ql/lib/semmle/code/java/dataflow/internal

1 file changed

+6
-1
lines changed

java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,5 +372,10 @@ class BaseSsaImplicitInit extends BaseSsaVariable instanceof Impl::WriteDefiniti
372372
/** An SSA phi node. */
373373
class BaseSsaPhiNode extends BaseSsaVariable instanceof Impl::PhiNode {
374374
/** Gets an input to the phi node defining the SSA variable. */
375-
BaseSsaVariable getAPhiInput() { phiHasInputFromBlock(this, result, _) }
375+
BaseSsaVariable getAPhiInput() { this.hasInputFromBlock(result, _) }
376+
377+
/** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */
378+
predicate hasInputFromBlock(BaseSsaVariable inp, BasicBlock bb) {
379+
phiHasInputFromBlock(this, inp, bb)
380+
}
376381
}

0 commit comments

Comments
 (0)