File tree Expand file tree Collapse file tree
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,9 +127,6 @@ private predicate ignoreExprAndDescendants(Expr expr) {
127127 exists ( BuiltInVarArgsStart vaStartExpr |
128128 vaStartExpr .getLastNamedParameter ( ) .getFullyConverted ( ) = expr
129129 )
130- or
131- // suppress destructors of temporary variables until proper support is added for them.
132- exists ( Expr parent | parent .getAnImplicitDestructorCall ( ) = expr )
133130}
134131
135132/**
Original file line number Diff line number Diff line change @@ -97,6 +97,19 @@ abstract class TranslatedExpr extends TranslatedElement {
9797 )
9898 }
9999
100+ final override predicate hasAnImplicitDestructorCall ( ) {
101+ exists ( expr .getAnImplicitDestructorCall ( ) )
102+ }
103+
104+ final override int getFirstDestructorCallIndex ( ) {
105+ not this .handlesDestructorsExplicitly ( ) and
106+ (
107+ result = max ( int childId | exists ( this .getChildInternal ( childId ) ) ) + 1
108+ or
109+ not exists ( this .getChildInternal ( _) ) and result = 0
110+ )
111+ }
112+
100113 final override Locatable getAst ( ) { result = expr }
101114
102115 final override Declaration getFunction ( ) { result = getEnclosingDeclaration ( expr ) }
You can’t perform that action at this time.
0 commit comments