From 4f44fd5c6f97bc5a577dd21dcfbfd5653414f700 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. llvm-svn: 72637 --- clang/include/clang/AST/DeclCXX.h | 16 ---------------- clang/include/clang/AST/DeclNodes.def | 1 - clang/lib/AST/DeclBase.cpp | 1 - clang/lib/AST/DeclCXX.cpp | 9 --------- 4 files changed, 27 deletions(-) diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h index 0971b6900e26..36c461bf52e6 100644 --- a/clang/include/clang/AST/DeclCXX.h +++ b/clang/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/clang/include/clang/AST/DeclNodes.def b/clang/include/clang/AST/DeclNodes.def index 7b60f6012cea..a82d26a20c05 100644 --- a/clang/include/clang/AST/DeclNodes.def +++ b/clang/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/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index ba8f3351c3a9..80b422e75388 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/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/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 6354d84784ec..19f89582770e 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/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: