]> granicus.if.org Git - clang/commitdiff
Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they
authorDouglas Gregor <dgregor@apple.com>
Thu, 22 Apr 2010 23:19:50 +0000 (23:19 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 22 Apr 2010 23:19:50 +0000 (23:19 +0000)
aren't and never were used. There's a gap in the bit pattern for IDNS
now, but I'm sure *someone* will fill it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102143 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclBase.h
lib/AST/DeclBase.cpp
lib/Sema/Sema.h
lib/Sema/SemaLookup.cpp

index d5913e236c2c4f3aaab17e13d67364cf7894a8af..32a52aa5250a96e9bbe9833402447ecf053977d0 100644 (file)
@@ -91,8 +91,6 @@ public:
     IDNS_Member = 0x4,
     IDNS_Ordinary = 0x8,
     IDNS_ObjCProtocol = 0x10,
-    IDNS_ObjCImplementation = 0x20,
-    IDNS_ObjCCategoryName = 0x40,
     IDNS_OrdinaryFriend = 0x80,
     IDNS_TagFriend = 0x100,
     IDNS_Using = 0x200
index c693e153dda590c417c853a109fa23fd6f4f7f14..b1585a3078f6881f30c6c01d8c1577bfd608e3aa 100644 (file)
@@ -257,13 +257,6 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) {
     case ObjCProtocol:
       return IDNS_ObjCProtocol;
 
-    case ObjCImplementation:
-      return IDNS_ObjCImplementation;
-
-    case ObjCCategory:
-    case ObjCCategoryImpl:
-      return IDNS_ObjCCategoryName;
-
     case Field:
     case ObjCAtDefsField:
     case ObjCIvar:
@@ -295,10 +288,13 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) {
     case Block:
     case TranslationUnit:
 
-    // Aren't looked up?
     case UsingDirective:
     case ClassTemplateSpecialization:
     case ClassTemplatePartialSpecialization:
+    case ObjCImplementation:
+    case ObjCCategory:
+    case ObjCCategoryImpl:
+      // Never looked up by name.
       return 0;
   }
 
index e3c8597485ea88ee8e33170d4c6ab7e52f698e24..65f7444a00f790a4ff905829be983ef22303a2cc 100644 (file)
@@ -1370,9 +1370,7 @@ public:
     /// C99 6.2.2p4-5 and C++ [basic.link]p6.
     LookupRedeclarationWithLinkage,
     /// Look up the name of an Objective-C protocol.
-    LookupObjCProtocolName,
-    /// Look up the name of an Objective-C implementation
-    LookupObjCImplementationName
+    LookupObjCProtocolName
   };
 
   /// \brief Specifies whether (or how) name lookup is being performed for a
index abc0ed381e07cac6f162698b671cfe32e0196c5f..8de0c40fb76716a9ddd8bd8b78b5eb7284356a1d 100644 (file)
@@ -232,7 +232,6 @@ LookupResult::ResultFilter getResultFilter(Sema::LookupNameKind NameKind) {
   case Sema::LookupRedeclarationWithLinkage: // FIXME: check linkage, scoping
   case Sema::LookupUsingDeclName:
   case Sema::LookupObjCProtocolName:
-  case Sema::LookupObjCImplementationName:
     return &IsAcceptableIDNS;
 
   case Sema::LookupOperatorName:
@@ -291,10 +290,6 @@ static inline unsigned getIDNS(Sema::LookupNameKind NameKind,
   case Sema::LookupObjCProtocolName:
     IDNS = Decl::IDNS_ObjCProtocol;
     break;
-
-  case Sema::LookupObjCImplementationName:
-    IDNS = Decl::IDNS_ObjCImplementation;
-    break;
   }
   return IDNS;
 }
@@ -1169,7 +1164,6 @@ bool Sema::LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
     case LookupOperatorName:
     case LookupNamespaceName:
     case LookupObjCProtocolName:
-    case LookupObjCImplementationName:
       // These lookups will never find a member in a C++ class (or base class).
       return false;