Add storage to test types, to trigger dtor call.

This commit is contained in:
Axel Naumann 2019-07-15 17:18:34 +02:00 committed by SFT
parent a3f236fe36
commit 4fef27091e
2 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,7 @@ V // CHECK-NEXT: (cling::Value &) boxes [(int [2][3][4]) { { { 1, 2, 3, 4 }, { 1
// Check lifetime of objects in Value
.rawInput 1
struct WithDtor {
char mem = 0;
static int fgCount;
WithDtor() { ++fgCount; }
WithDtor(const WithDtor&) { ++fgCount; }

View File

@ -14,7 +14,7 @@
extern "C" int printf(const char*,...);
class A {
int m_A[2];
int m_A[2] = 0;
public:
A() {}
~A() { printf("A::~A()\n"); }
@ -43,6 +43,7 @@ public:
int gTest = 0;
class E {
char mem = 0;
public:
~E() { gTest = 101; }
};