C++: Suppress destructor calls for the right-hand side of logical operations since these are also conditional.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-04-05 09:47:11 +01:00
parent e63a607eb3
commit d279e3f17a

View File

@@ -279,6 +279,10 @@ private predicate isInConditionalEvaluation(Expr e) {
e = cond.getFullyConverted() e = cond.getFullyConverted()
) )
or or
e = any(LogicalAndExpr lae).getRightOperand().getFullyConverted()
or
e = any(LogicalOrExpr loe).getRightOperand().getFullyConverted()
or
isInConditionalEvaluation(getRealParent(e)) isInConditionalEvaluation(getRealParent(e))
} }