[cfe-commits] r64146 - /cfe/trunk/lib/AST/Expr.cpp
Ted Kremenek
kremenek at apple.com
Mon Feb 9 09:10:09 PST 2009
Author: kremenek
Date: Mon Feb 9 11:10:09 2009
New Revision: 64146
URL: http://llvm.org/viewvc/llvm-project?rev=64146&view=rev
Log:
Deallocate the StringLiteral itself in StringLiteral::Destroy() and deallocate the string data before running StringLiteral's destructor.
Modified:
cfe/trunk/lib/AST/Expr.cpp
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=64146&r1=64145&r2=64146&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Mon Feb 9 11:10:09 2009
@@ -54,8 +54,9 @@
}
void StringLiteral::Destroy(ASTContext &C) {
- this->~StringLiteral();
C.Deallocate(const_cast<char*>(StrData));
+ this->~StringLiteral();
+ C.Deallocate(this);
}
bool UnaryOperator::isPostfix(Opcode Op) {
More information about the cfe-commits
mailing list