Revert "Fix ExprStmt and StmtExpr in Boolean context"

This reverts commit 8a42837578e1c4361ed25682312ea5497ad0a12e.
This commit is contained in:
Ian Lynagh
2022-04-12 19:09:13 +01:00
parent 3aa25013c8
commit d2f6871868
6 changed files with 3 additions and 12 deletions

View File

@@ -286,7 +286,7 @@ private module ControlFlowGraphImpl {
* That is, contexts where the control-flow edges depend on `value` given that `b` ends
* with a `booleanCompletion(value, _)`.
*/
private predicate inBooleanContext(ControlFlowNode b) {
private predicate inBooleanContext(Expr b) {
exists(LogicExpr logexpr |
logexpr.(BinaryExpr).getLeftOperand() = b
or
@@ -316,10 +316,6 @@ private module ControlFlowGraphImpl {
inBooleanContext(whenexpr) and
whenexpr.getBranch(_).getAResult() = b
)
or
inBooleanContext(b.(ExprStmt).getExpr())
or
inBooleanContext(b.(StmtExpr).getStmt())
}
/**