]> granicus.if.org Git - clang/commitdiff
Get rid of CXXTempVarDecl.
authorAnders Carlsson <andersca@mac.com>
Sat, 30 May 2009 21:10:34 +0000 (21:10 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 30 May 2009 21:10:34 +0000 (21:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72637 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclCXX.h
include/clang/AST/DeclNodes.def
lib/AST/DeclBase.cpp
lib/AST/DeclCXX.cpp

index 0971b6900e268c86951698e49e989df7693ad96a..36c461bf52e6fb0ad31be077ebbe50a11ee8f01d 100644 (file)
@@ -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,
index 7b60f6012ceaf6bf244e5233142c075e00c51232..a82d26a20c05fb54c23ab2e67e1a076495c946a9 100644 (file)
@@ -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)
index ba8f3351c3a9c7ec92de14583eb19de8aefd9ec2..80b422e75388413fcebfeb3584355120da80367c 100644 (file)
@@ -208,7 +208,6 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) {
     case ObjCForwardProtocol:
     case Block:
     case TranslationUnit:
-    case CXXTempVar:
 
     // Aren't looked up?
     case UsingDirective:
index 6354d84784ec125bf465047b9e5a13f09d4136f1..19f89582770e332aa7a04c41d0bfc2ece84a2ee4 100644 (file)
@@ -439,15 +439,6 @@ void StaticAssertDecl::Destroy(ASTContext& C) {
 StaticAssertDecl::~StaticAssertDecl() {
 }
 
-CXXTempVarDecl *CXXTempVarDecl::Create(ASTContext &C, DeclContext *DC,
-                                       QualType T) {
-  assert((T->isDependentType() || 
-          isa<CXXRecordDecl>(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: