Skip to content

Commit 54e4103

Browse files
committed
C++: Fix another multiple parents problem.
1 parent 955f9c7 commit 54e4103

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,14 @@ class TranslatedLoad extends TranslatedValueCategoryAdjustment, TTranslatedLoad
411411
result = this.getOperand().getResult()
412412
)
413413
}
414+
415+
override predicate handlesDestructorsExplicitly() {
416+
// The class that generates IR for `e` will (implicitly or explicitly)
417+
// handle the generation of destructor calls for `e`. Without disabling
418+
// destructor call generation here the destructor will get multiple
419+
// parents.
420+
any()
421+
}
414422
}
415423

416424
/**

0 commit comments

Comments
 (0)