fix deallocation of FunctionDecl::ParamInfo

llvm-svn: 62469
This commit is contained in:
Nuno Lopes 2009-01-18 19:57:27 +00:00
parent ffbcf96d1c
commit 9018ca711a
2 changed files with 4 additions and 6 deletions

View File

@ -664,7 +664,7 @@ protected:
SClass(S), IsInline(isInline), IsVirtual(false), IsPure(false),
TypeSpecStartLoc(TSSL) {}
virtual ~FunctionDecl();
virtual ~FunctionDecl() {}
virtual void Destroy(ASTContext& C);
public:

View File

@ -224,17 +224,15 @@ VarDecl::~VarDecl() {
// FunctionDecl Implementation
//===----------------------------------------------------------------------===//
FunctionDecl::~FunctionDecl() {
delete[] ParamInfo;
}
void FunctionDecl::Destroy(ASTContext& C) {
if (Body)
Body->Destroy(C);
for (param_iterator I=param_begin(), E=param_end(); I!=E; ++I)
(*I)->Destroy(C);
C.getAllocator().Deallocate(ParamInfo);
Decl::Destroy(C);
}