Skip to content

Commit 52f58ec

Browse files
committed
Undo accidental bugfix
This is unrelated to the main purpose of this PR. I have made a separate PR to do it here: #17988
1 parent 3a662f2 commit 52f58ec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class UnreachableBasicBlock extends BasicBlock {
221221
// Not accessible from the successful case
222222
not constSwitchStmt.getMatchingCase().getBasicBlock().getABBSuccessor*() = failingCaseBlock and
223223
// Blocks dominated by the failing case block are unreachable
224-
failingCaseBlock.bbDominates(this)
224+
constSwitchStmt.getAFailingCase().getBasicBlock().bbDominates(this)
225225
)
226226
}
227227
}

java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
| unreachableblocks/Unreachable.java:12:22:14:3 | { ... } |
44
| unreachableblocks/Unreachable.java:17:3:17:9 | case ... |
55
| unreachableblocks/Unreachable.java:19:3:19:9 | case ... |
6+
| unreachableblocks/Unreachable.java:22:3:22:9 | case ... |
67
| unreachableblocks/Unreachable.java:24:3:24:9 | case ... |
78
| unreachableblocks/Unreachable.java:26:3:26:10 | case ... |
89
| unreachableblocks/Unreachable.java:27:3:27:10 | default |

0 commit comments

Comments
 (0)