From 1c02101999a576790b433ac4b5195e7ac4197347 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 30 May 2009 21:10:34 +0000 Subject: [PATCH] Get rid of CXXTempVarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72637 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/DeclCXX.h | 16 ---------------- include/clang/AST/DeclNodes.def | 1 - lib/AST/DeclBase.cpp | 1 - lib/AST/DeclCXX.cpp | 9 --------- 4 files changed, 27 deletions(-) diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 0971b6900e..36c461bf52 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -1062,22 +1062,6 @@ public: static bool classof(StaticAssertDecl *D) { return true; } }; -/// CXXTempVarDecl - Represents an implicit C++ temporary variable declaration. -class CXXTempVarDecl : public VarDecl { -protected: - CXXTempVarDecl(DeclContext *DC, QualType T) - : VarDecl(CXXTempVar, DC, SourceLocation(), 0, T, None) {} - -public: - static CXXTempVarDecl *Create(ASTContext &C, DeclContext *DC, - QualType T); - - static bool classof(const Decl *D) { - return D->getKind() == Decl::CXXTempVar; - } - static bool classof(CXXTempVarDecl *D) { return true; } -}; - /// Insertion operator for diagnostics. This allows sending AccessSpecifier's /// into a diagnostic with <<. const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, diff --git a/include/clang/AST/DeclNodes.def b/include/clang/AST/DeclNodes.def index 7b60f6012c..a82d26a20c 100644 --- a/include/clang/AST/DeclNodes.def +++ b/include/clang/AST/DeclNodes.def @@ -102,7 +102,6 @@ ABSTRACT_DECL(Named, Decl) DECL(ParmVar, VarDecl) DECL(OriginalParmVar, ParmVarDecl) DECL(NonTypeTemplateParm, VarDecl) - DECL(CXXTempVar, VarDecl) DECL(Template, NamedDecl) DECL(FunctionTemplate, TemplateDecl) DECL(ClassTemplate, TemplateDecl) diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index ba8f3351c3..80b422e753 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -208,7 +208,6 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { case ObjCForwardProtocol: case Block: case TranslationUnit: - case CXXTempVar: // Aren't looked up? case UsingDirective: diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index 6354d84784..19f8958277 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -439,15 +439,6 @@ void StaticAssertDecl::Destroy(ASTContext& C) { StaticAssertDecl::~StaticAssertDecl() { } -CXXTempVarDecl *CXXTempVarDecl::Create(ASTContext &C, DeclContext *DC, - QualType T) { - assert((T->isDependentType() || - isa(T->getAsRecordType()->getDecl())) && - "CXXTempVarDecl must either have a dependent type " - "or a C++ record type!"); - return new (C) CXXTempVarDecl(DC, T); -} - static const char *getAccessName(AccessSpecifier AS) { switch (AS) { default: -- 2.40.0