mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
C++: Ensure 'isConditionalTemporaryDestructorCall' only holds when the reused expression is a temporary.
This commit is contained in:
@@ -287,7 +287,10 @@ private predicate isInConditionalEvaluation(Expr e) {
|
||||
}
|
||||
|
||||
private predicate isConditionalTemporaryDestructorCall(DestructorCall dc) {
|
||||
isInConditionalEvaluation(dc.getQualifier().(ReuseExpr).getReusedExpr())
|
||||
exists(TemporaryObjectExpr temp |
|
||||
temp = dc.getQualifier().(ReuseExpr).getReusedExpr() and
|
||||
isInConditionalEvaluation(temp)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user