aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-22 23:35:25 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-22 23:35:25 +0000
commitbaf633b41fc1cb42fd5e128954550bf1853f2a8d (patch)
tree8e3b7ad8bd19d71a397f778be8ffc3af468d3017
parentbd4187bb6f4a0cfe7d6d2c8e8856b16bca2f0748 (diff)
Make TemplateDecl and ObjCContainerDecl abstract
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102145 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclNodes.def8
-rw-r--r--lib/AST/Decl.cpp1
-rw-r--r--lib/AST/DeclBase.cpp2
-rw-r--r--tools/CIndex/CIndex.cpp4
4 files changed, 4 insertions, 11 deletions
diff --git a/include/clang/AST/DeclNodes.def b/include/clang/AST/DeclNodes.def
index 082299c41f..5b03ff8d91 100644
--- a/include/clang/AST/DeclNodes.def
+++ b/include/clang/AST/DeclNodes.def
@@ -105,14 +105,14 @@ ABSTRACT_DECL(Named, Decl)
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 @@ LAST_DECL_CONTEXT(Block)
// 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(Record, Record, ClassTemplatePartialSpecialization)
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)
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index b11f61757d..1d94c20ef8 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -297,7 +297,6 @@ Linkage NamedDecl::getLinkage() const {
case Decl::ObjCCategoryImpl:
case Decl::ObjCClass:
case Decl::ObjCCompatibleAlias:
- case Decl::ObjCContainer:
case Decl::ObjCForwardProtocol:
case Decl::ObjCImplementation:
case Decl::ObjCInterface:
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index b1585a3078..61d22b9d70 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -238,7 +238,6 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) {
case ParmVar:
case NonTypeTemplateParm:
case ObjCMethod:
- case ObjCContainer:
case ObjCInterface:
case ObjCProperty:
case ObjCCompatibleAlias:
@@ -269,7 +268,6 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) {
return IDNS_Tag;
case Namespace:
- case Template:
case FunctionTemplate:
case ClassTemplate:
case TemplateTemplateParm:
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 5e7114d9ef..9cdb9659fe 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -1921,8 +1921,6 @@ CXCursor clang_getCursorDefinition(CXCursor C) {
// 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 @@ static CXLanguageKind getDeclLanguage(const Decl *D) {
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 @@ static CXLanguageKind getDeclLanguage(const Decl *D) {
case Decl::NamespaceAlias:
case Decl::NonTypeTemplateParm:
case Decl::StaticAssert:
- case Decl::Template:
case Decl::TemplateTemplateParm:
case Decl::TemplateTypeParm:
case Decl::UnresolvedUsingTypename: