Skip to content

Commit 42d1e96

Browse files
committed
Java: Adjust Paths.qll
1 parent f2c4398 commit 42d1e96

File tree

1 file changed

+5
-1
lines changed
  • java/ql/lib/semmle/code/java/controlflow

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ private class JoinBlock extends BasicBlock {
6666
JoinBlock() { 2 <= strictcount(this.getAPredecessor()) }
6767
}
6868

69+
private class ReachableBlock extends BasicBlock {
70+
ReachableBlock() { hasDominanceInformation(this) }
71+
}
72+
6973
/**
7074
* Holds if `bb` is a block that is collectively dominated by a set of one or
7175
* more actions that individually does not dominate the exit.
@@ -74,7 +78,7 @@ private predicate postActionBlock(BasicBlock bb, ActionConfiguration conf) {
7478
bb = nonDominatingActionBlock(conf)
7579
or
7680
if bb instanceof JoinBlock
77-
then forall(BasicBlock pred | pred = bb.getAPredecessor() | postActionBlock(pred, conf))
81+
then forall(ReachableBlock pred | pred = bb.getAPredecessor() | postActionBlock(pred, conf))
7882
else postActionBlock(bb.getAPredecessor(), conf)
7983
}
8084

0 commit comments

Comments
 (0)