mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
C++: Suppress destructor calls for the right-hand side of logical operations since these are also conditional.
This commit is contained in:
@@ -279,6 +279,10 @@ private predicate isInConditionalEvaluation(Expr e) {
|
||||
e = cond.getFullyConverted()
|
||||
)
|
||||
or
|
||||
e = any(LogicalAndExpr lae).getRightOperand().getFullyConverted()
|
||||
or
|
||||
e = any(LogicalOrExpr loe).getRightOperand().getFullyConverted()
|
||||
or
|
||||
isInConditionalEvaluation(getRealParent(e))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user