mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +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()
|
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))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user