aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/Decl.h2
-rw-r--r--lib/AST/Decl.cpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index c0325bdafb..050768fe30 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -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:
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 8ae9311017..5ec6aff4f5 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -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);
}