@@ -2208,6 +2208,43 @@ class TranslatedDestructorFieldDestruction extends TranslatedNonConstantExpr, St
2208
2208
private TranslatedExpr getDestructorCall ( ) { result = getTranslatedExpr ( expr .getExpr ( ) ) }
2209
2209
}
2210
2210
2211
+ /**
2212
+ * The IR translation of a vacuous destructor call. That is, an expression that
2213
+ * looks like a destructor call, but has no effect.
2214
+ *
2215
+ * Note that, even though there's no destructor call, we should still evaluate
2216
+ * the qualifier.
2217
+ */
2218
+ class TranslatedVacuousDestructorCall extends TranslatedNonConstantExpr {
2219
+ override VacuousDestructorCall expr ;
2220
+
2221
+ override Instruction getInstructionSuccessor ( InstructionTag tag , EdgeKind kind ) { none ( ) }
2222
+
2223
+ final TranslatedExpr getQualifier ( ) {
2224
+ result = getTranslatedExpr ( expr .getQualifier ( ) .getFullyConverted ( ) )
2225
+ }
2226
+
2227
+ override Instruction getFirstInstruction ( EdgeKind kind ) {
2228
+ result = this .getQualifier ( ) .getFirstInstruction ( kind )
2229
+ }
2230
+
2231
+ override Instruction getChildSuccessor ( TranslatedElement child , EdgeKind kind ) {
2232
+ child = this .getQualifier ( ) and
2233
+ result = this .getParent ( ) .getChildSuccessor ( this , kind )
2234
+ }
2235
+
2236
+ override TranslatedElement getChild ( int id ) {
2237
+ id = 0 and
2238
+ result = this .getQualifier ( )
2239
+ }
2240
+
2241
+ override Instruction getResult ( ) { none ( ) }
2242
+
2243
+ override predicate hasInstruction ( Opcode opcode , InstructionTag tag , CppType resultType ) {
2244
+ none ( )
2245
+ }
2246
+ }
2247
+
2211
2248
/**
2212
2249
* The IR translation of the `?:` operator. This class has the portions of the implementation that
2213
2250
* are shared between the standard three-operand form (`a ? b : c`) and the GCC-extension
0 commit comments