We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef72a06 commit bf59a74Copy full SHA for bf59a74
lib/Interpreter/Value.cpp
@@ -96,6 +96,7 @@ namespace {
96
while (m_NElements-- != 0)
97
(*m_DtorFunc)(Payload + m_NElements * Skip);
98
}
99
+ this->~AllocatedValue();
100
delete [] (char*)this;
101
102
@@ -221,7 +222,7 @@ namespace cling {
221
222
dtorFunc = m_Interpreter->compileDtorCallFor(RTy->getDecl());
223
224
const clang::ASTContext& ctx = getASTContext();
- unsigned payloadSize = ctx.getTypeSizeInChars(getType()).getQuantity();
225
+ const auto payloadSize = ctx.getTypeSizeInChars(getType()).getQuantity();
226
char* alloc = new char[AllocatedValue::getPayloadOffset() + payloadSize];
227
AllocatedValue* allocVal = new (alloc) AllocatedValue(dtorFunc, payloadSize,
228
GetNumberOfElements());
0 commit comments