Revert "Fix CFG construction of ExprStmt and StmtExpr"

This reverts commit db8d718cdbf0bef9cdf246221a921b99d4b22bea.

It broke ql/java/ql/test/library-tests/successors/TestDeclarations
This commit is contained in:
Ian Lynagh
2022-04-12 19:09:17 +01:00
parent d2f6871868
commit b35b74779a
7 changed files with 24 additions and 8 deletions

View File

@@ -909,8 +909,7 @@ 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 = NormalCompletion()
or
// the last node in a `StmtExpr` is the last node in the statement
last(n.(StmtExpr).getStmt(), last, completion)
@@ -1233,9 +1232,9 @@ private module ControlFlowGraphImpl {
n = synch and result = first(synch.getBlock())
)
or
result = first(n.(ExprStmt).getExpr()) and completion instanceof NormalOrBooleanCompletion
result = first(n.(ExprStmt).getExpr()) and completion = NormalCompletion()
or
result = first(n.(StmtExpr).getStmt()) and completion instanceof NormalOrBooleanCompletion
result = first(n.(StmtExpr).getStmt()) and completion = NormalCompletion()
or
result = first(n.(LabeledStmt).getStmt()) and completion = NormalCompletion()
or