[cfe-commits] r102145 - in /cfe/trunk: include/clang/AST/DeclNodes.def lib/AST/Decl.cpp lib/AST/DeclBase.cpp tools/CIndex/CIndex.cpp

Douglas Gregor dgregor at apple.com
Thu Apr 22 16:35:25 PDT 2010


Author: dgregor
Date: Thu Apr 22 18:35:25 2010
New Revision: 102145

URL: http://llvm.org/viewvc/llvm-project?rev=102145&view=rev
Log:
Make TemplateDecl and ObjCContainerDecl abstract

Modified:
    cfe/trunk/include/clang/AST/DeclNodes.def
    cfe/trunk/lib/AST/Decl.cpp
    cfe/trunk/lib/AST/DeclBase.cpp
    cfe/trunk/tools/CIndex/CIndex.cpp

Modified: cfe/trunk/include/clang/AST/DeclNodes.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclNodes.def?rev=102145&r1=102144&r2=102145&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclNodes.def (original)
+++ cfe/trunk/include/clang/AST/DeclNodes.def Thu Apr 22 18:35:25 2010
@@ -105,14 +105,14 @@
         DECL(ImplicitParam, VarDecl)
         DECL(ParmVar, VarDecl)
         DECL(NonTypeTemplateParm, VarDecl)
-  DECL(Template, NamedDecl)
+  ABSTRACT_DECL(Template, NamedDecl)
     DECL(FunctionTemplate, TemplateDecl)
     DECL(ClassTemplate, TemplateDecl)
     DECL(TemplateTemplateParm, TemplateDecl)
   DECL(Using, NamedDecl)
   DECL(UsingShadow, NamedDecl)
   DECL(ObjCMethod, NamedDecl)
-  DECL(ObjCContainer, NamedDecl)
+  ABSTRACT_DECL(ObjCContainer, NamedDecl)
     DECL(ObjCCategory, ObjCContainerDecl)
     DECL(ObjCProtocol, ObjCContainerDecl)
     DECL(ObjCInterface, ObjCContainerDecl)
@@ -143,7 +143,7 @@
 
 // Declaration ranges
 DECL_RANGE(Named, Namespace, ObjCCompatibleAlias)
-DECL_RANGE(ObjCContainer, ObjCContainer, ObjCImplementation)
+DECL_RANGE(ObjCContainer, ObjCCategory, ObjCImplementation)
 DECL_RANGE(Field, Field, ObjCAtDefsField)
 DECL_RANGE(Type, Typedef, TemplateTypeParm)
 DECL_RANGE(Tag, Enum, ClassTemplatePartialSpecialization)
@@ -151,7 +151,7 @@
 DECL_RANGE(Value, EnumConstant, NonTypeTemplateParm)
 DECL_RANGE(Declarator, Function, NonTypeTemplateParm)
 DECL_RANGE(Function, Function, CXXConversion)
-DECL_RANGE(Template, Template, TemplateTemplateParm)
+DECL_RANGE(Template, FunctionTemplate, TemplateTemplateParm)
 DECL_RANGE(ObjCImpl, ObjCCategoryImpl, ObjCImplementation)
 LAST_DECL_RANGE(Var, Var, NonTypeTemplateParm)
 

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=102145&r1=102144&r2=102145&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Thu Apr 22 18:35:25 2010
@@ -297,7 +297,6 @@
     case Decl::ObjCCategoryImpl:
     case Decl::ObjCClass:
     case Decl::ObjCCompatibleAlias:
-    case Decl::ObjCContainer:
     case Decl::ObjCForwardProtocol:
     case Decl::ObjCImplementation:
     case Decl::ObjCInterface:

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=102145&r1=102144&r2=102145&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Thu Apr 22 18:35:25 2010
@@ -238,7 +238,6 @@
     case ParmVar:
     case NonTypeTemplateParm:
     case ObjCMethod:
-    case ObjCContainer:
     case ObjCInterface:
     case ObjCProperty:
     case ObjCCompatibleAlias:
@@ -269,7 +268,6 @@
       return IDNS_Tag;
 
     case Namespace:
-    case Template:
     case FunctionTemplate:
     case ClassTemplate:
     case TemplateTemplateParm:

Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=102145&r1=102144&r2=102145&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Thu Apr 22 18:35:25 2010
@@ -1921,8 +1921,6 @@
   // Declaration kinds that don't make any sense here, but are
   // nonetheless harmless.
   case Decl::TranslationUnit:
-  case Decl::Template:
-  case Decl::ObjCContainer:
     break;
 
   // Declaration kinds for which the definition is not resolvable.
@@ -2486,7 +2484,6 @@
     case Decl::ObjCCategoryImpl:
     case Decl::ObjCClass:
     case Decl::ObjCCompatibleAlias:
-    case Decl::ObjCContainer:
     case Decl::ObjCForwardProtocol:
     case Decl::ObjCImplementation:
     case Decl::ObjCInterface:
@@ -2512,7 +2509,6 @@
     case Decl::NamespaceAlias:
     case Decl::NonTypeTemplateParm:
     case Decl::StaticAssert:
-    case Decl::Template:
     case Decl::TemplateTemplateParm:
     case Decl::TemplateTypeParm:
     case Decl::UnresolvedUsingTypename:





More information about the cfe-commits mailing list