Skip to content
Snippets Groups Projects
Commit 7302a74f authored by Yaron Keren's avatar Yaron Keren
Browse files

CXXInfo memory should be released after calling the destructor

instead of before. The wrong order had no effect since Deallocate() 
does nothing right now, but we may replace allocator in the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209567 91177308-0d34-0410-b5e6-96231b3b80d8
parent da3cc83a
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,8 @@ void ASTRecordLayout::Destroy(ASTContext &Ctx) {
if (FieldOffsets)
Ctx.Deallocate(FieldOffsets);
if (CXXInfo) {
Ctx.Deallocate(CXXInfo);
CXXInfo->~CXXRecordLayoutInfo();
Ctx.Deallocate(CXXInfo);
}
this->~ASTRecordLayout();
Ctx.Deallocate(this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment