Remove destructors from declaration nodes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109380 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index e92f530..a30a430 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -531,8 +531,6 @@
return decl->getInnerLocStart();
}
-DeclaratorDecl::~DeclaratorDecl() {}
-
SourceLocation DeclaratorDecl::getTypeSpecStartLoc() const {
TypeSourceInfo *TSI = getTypeSourceInfo();
if (TSI) return TSI->getTypeLoc().getBeginLoc();
@@ -621,9 +619,6 @@
return new (C) VarDecl(Var, DC, L, Id, T, TInfo, S, SCAsWritten);
}
-VarDecl::~VarDecl() {
-}
-
SourceLocation VarDecl::getInnerLocStart() const {
SourceLocation Start = getTypeSpecStartLoc();
if (Start.isInvalid())
@@ -1664,9 +1659,6 @@
SourceLocation());
}
-RecordDecl::~RecordDecl() {
-}
-
bool RecordDecl::isInjectedClassName() const {
return isImplicit() && getDeclName() && getDeclContext()->isRecord() &&
cast<RecordDecl>(getDeclContext())->getDeclName() == getDeclName();
@@ -1694,9 +1686,6 @@
// BlockDecl Implementation
//===----------------------------------------------------------------------===//
-BlockDecl::~BlockDecl() {
-}
-
void BlockDecl::setParams(ParmVarDecl **NewParamInfo,
unsigned NParms) {
assert(ParamInfo == 0 && "Already has param info!");
@@ -1762,9 +1751,6 @@
return new (C) TypedefDecl(DC, L, Id, TInfo);
}
-// Anchor TypedefDecl's vtable here.
-TypedefDecl::~TypedefDecl() {}
-
FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
StringLiteral *Str) {
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index b38d0c2..83976a5 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -470,12 +470,7 @@
}
}
-DeclContext::~DeclContext() {
- // FIXME: Currently ~ASTContext will delete the StoredDeclsMaps because
- // ~DeclContext() is not guaranteed to be called when ASTContext uses
- // a BumpPtrAllocator.
- // delete LookupPtr;
-}
+DeclContext::~DeclContext() { }
/// \brief Find the parent context of this context that will be
/// used for unqualified name lookup.
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 2581f9d..5801afd 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -65,9 +65,6 @@
SourceLocation());
}
-CXXRecordDecl::~CXXRecordDecl() {
-}
-
void
CXXRecordDecl::setBases(CXXBaseSpecifier const * const *Bases,
unsigned NumBases) {
@@ -1046,9 +1043,6 @@
return new (C) StaticAssertDecl(DC, L, AssertExpr, Message);
}
-StaticAssertDecl::~StaticAssertDecl() {
-}
-
static const char *getAccessName(AccessSpecifier AS) {
switch (AS) {
default:
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp
index 6aa6ec5..22b297d 100644
--- a/lib/AST/DeclTemplate.cpp
+++ b/lib/AST/DeclTemplate.cpp
@@ -84,13 +84,6 @@
}
//===----------------------------------------------------------------------===//
-// TemplateDecl Implementation
-//===----------------------------------------------------------------------===//
-
-TemplateDecl::~TemplateDecl() {
-}
-
-//===----------------------------------------------------------------------===//
// FunctionTemplateDecl Implementation
//===----------------------------------------------------------------------===//
@@ -462,8 +455,6 @@
StructuredArguments.setInt(0); // Doesn't own the pointer.
}
-TemplateArgumentList::~TemplateArgumentList() {}
-
//===----------------------------------------------------------------------===//
// ClassTemplateSpecializationDecl Implementation
//===----------------------------------------------------------------------===//