mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Fix CFG construction of ExprStmt and StmtExpr
This commit is contained in:
@@ -909,7 +909,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 = NormalCompletion()
|
||||
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)
|
||||
@@ -1232,9 +1233,9 @@ private module ControlFlowGraphImpl {
|
||||
n = synch and result = first(synch.getBlock())
|
||||
)
|
||||
or
|
||||
result = first(n.(ExprStmt).getExpr()) and completion = NormalCompletion()
|
||||
result = first(n.(ExprStmt).getExpr()) and completion instanceof NormalOrBooleanCompletion
|
||||
or
|
||||
result = first(n.(StmtExpr).getStmt()) and completion = NormalCompletion()
|
||||
result = first(n.(StmtExpr).getStmt()) and completion instanceof NormalOrBooleanCompletion
|
||||
or
|
||||
result = first(n.(LabeledStmt).getStmt()) and completion = NormalCompletion()
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user