зеркало из https://github.com/microsoft/clang-1.git
Deallocate the StringLiteral itself in StringLiteral::Destroy() and deallocate the string data before running StringLiteral's destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64146 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
fb7413f126
Коммит
353ffceafc
|
@ -54,8 +54,9 @@ StringLiteral::StringLiteral(ASTContext& C, const char *strData,
|
||||||
}
|
}
|
||||||
|
|
||||||
void StringLiteral::Destroy(ASTContext &C) {
|
void StringLiteral::Destroy(ASTContext &C) {
|
||||||
this->~StringLiteral();
|
|
||||||
C.Deallocate(const_cast<char*>(StrData));
|
C.Deallocate(const_cast<char*>(StrData));
|
||||||
|
this->~StringLiteral();
|
||||||
|
C.Deallocate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UnaryOperator::isPostfix(Opcode Op) {
|
bool UnaryOperator::isPostfix(Opcode Op) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче