C++: Order left and right operands in the logical left to right order

This commit is contained in:
Jeroen Ketema
2022-07-12 15:21:37 +02:00
parent a6048dd594
commit 2ceb25dc9a

View File

@@ -46,7 +46,7 @@ predicate nullCheckExpr(Expr checkExpr, Variable var) {
or
exists(LogicalAndExpr op, AnalysedExpr child |
expr = op and
(op.getRightOperand() = child or op.getLeftOperand() = child) and
(op.getLeftOperand() = child or op.getRightOperand() = child) and
nullCheckExpr(child, v)
)
or
@@ -99,7 +99,7 @@ predicate validCheckExpr(Expr checkExpr, Variable var) {
or
exists(LogicalAndExpr op, AnalysedExpr child |
expr = op and
(op.getRightOperand() = child or op.getLeftOperand() = child) and
(op.getLeftOperand() = child or op.getRightOperand() = child) and
validCheckExpr(child, v)
)
or