diff --git a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll index c12f42ee568..229c526d270 100644 --- a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll +++ b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll @@ -911,7 +911,8 @@ private module ControlFlowGraphImpl { ) or // the last node in an `ExprStmt` is the last node in the expression - last(n.(ExprStmt).getExpr(), last, completion) and completion instanceof NormalOrBooleanCompletion + last(n.(ExprStmt).getExpr(), last, completion) and + completion instanceof NormalOrBooleanCompletion or // the last node in a `StmtExpr` is the last node in the statement last(n.(StmtExpr).getStmt(), last, completion)