[cfe-commits] r62469 - in /cfe/trunk: include/clang/AST/Decl.h lib/AST/Decl.cpp
Nuno Lopes
nunoplopes at sapo.pt
Sun Jan 18 11:57:27 PST 2009
Author: nlopes
Date: Sun Jan 18 13:57:27 2009
New Revision: 62469
URL: http://llvm.org/viewvc/llvm-project?rev=62469&view=rev
Log:
fix deallocation of FunctionDecl::ParamInfo
Modified:
cfe/trunk/include/clang/AST/Decl.h
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=62469&r1=62468&r2=62469&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Sun Jan 18 13:57:27 2009
@@ -664,7 +664,7 @@
SClass(S), IsInline(isInline), IsVirtual(false), IsPure(false),
TypeSpecStartLoc(TSSL) {}
- virtual ~FunctionDecl();
+ virtual ~FunctionDecl() {}
virtual void Destroy(ASTContext& C);
public:
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=62469&r1=62468&r2=62469&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Sun Jan 18 13:57:27 2009
@@ -224,17 +224,15 @@
// 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);
}
More information about the cfe-commits
mailing list