forked from OSchip/llvm-project
fix deallocation of FunctionDecl::ParamInfo
llvm-svn: 62469
This commit is contained in:
parent
ffbcf96d1c
commit
9018ca711a
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue