Skip to content

Commit a98d93b

Browse files
committed
Java: Override dominates to reference the right type.
1 parent 6b830fa commit a98d93b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ class BasicBlock extends BbImpl::BasicBlock {
7979
/** Gets the immediately enclosing callable whose body contains this node. */
8080
Callable getEnclosingCallable() { result = this.getScope() }
8181

82+
/**
83+
* Holds if this basic block dominates basic block `bb`.
84+
*
85+
* That is, all paths reaching `bb` from the entry point basic block must
86+
* go through this basic block.
87+
*/
88+
predicate dominates(BasicBlock bb) { super.dominates(bb) }
89+
8290
/**
8391
* DEPRECATED: Use `getASuccessor` instead.
8492
*

0 commit comments

Comments
 (0)