From: Douglas Gregor Date: Thu, 22 Apr 2010 23:19:50 +0000 (+0000) Subject: Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd4187bb6f4a0cfe7d6d2c8e8856b16bca2f0748;p=clang Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they 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 --- diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index d5913e236c..32a52aa525 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -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 diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index c693e153dd..b1585a3078 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -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; } diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h index e3c8597485..65f7444a00 100644 --- a/lib/Sema/Sema.h +++ b/lib/Sema/Sema.h @@ -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 diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index abc0ed381e..8de0c40fb7 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -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;