Skip to content

Commit d854396

Browse files
committed
Fix switchexpr control flow error
1 parent ae12d27 commit d854396

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/lib/semmle/code/java/ControlFlowGraph.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private import controlflow.internal.SwitchCases
8686

8787
module ControlFlow {
8888
private predicate hasControlFlow(Expr e) {
89-
not e.getEnclosingStmt() instanceof ConstCase and
89+
not exists(ConstCase cc | e = cc.getValue(_)) and
9090
not e.getParent*() instanceof Annotation and
9191
not e instanceof TypeAccess and
9292
not e instanceof ArrayTypeAccess and

0 commit comments

Comments
 (0)