mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
C++: Only report implicit destructors if we need to translate them.
This commit is contained in:
@@ -92,13 +92,17 @@ abstract class TranslatedExpr extends TranslatedElement {
|
||||
or
|
||||
exists(int maxChildId, int destructorIndex |
|
||||
maxChildId = max(int childId | exists(this.getChildInternal(childId))) and
|
||||
result.(TranslatedExpr).getExpr() = expr.getImplicitDestructorCall(destructorIndex) and
|
||||
result = this.getImplicitDestructorCall(destructorIndex) and
|
||||
id = maxChildId + 1 + destructorIndex
|
||||
)
|
||||
}
|
||||
|
||||
final private TranslatedExpr getImplicitDestructorCall(int index) {
|
||||
result.getExpr() = expr.getImplicitDestructorCall(index)
|
||||
}
|
||||
|
||||
final override predicate hasAnImplicitDestructorCall() {
|
||||
exists(expr.getAnImplicitDestructorCall())
|
||||
exists(this.getImplicitDestructorCall(_))
|
||||
}
|
||||
|
||||
final override int getFirstDestructorCallIndex() {
|
||||
|
||||
Reference in New Issue
Block a user