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) {
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits