diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-11-21 07:57:53 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-11-21 07:57:53 +0000 |
commit | a14c3119acc4f0c70cb91a847d55175e7be0f1a7 (patch) | |
tree | adf7088936a4bf90e3b53446b1e39c938d1a3423 /clang/lib/AST/DeclObjC.cpp | |
parent | fbc1adbaa75ae4f065461ccab279a43c46c94bf2 (diff) | |
download | bcm5719-llvm-a14c3119acc4f0c70cb91a847d55175e7be0f1a7.tar.gz bcm5719-llvm-a14c3119acc4f0c70cb91a847d55175e7be0f1a7.zip |
Revert "Add new attribute 'objc_suppress_protocol' to suppress protocol conformance for a class."
After implementing this patch, a few concerns about the language
feature itself emerged in my head that I had previously not considered.
I want to resolve those design concerns first before having
a half-designed language feature in the tree.
llvm-svn: 195328
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index d759c0795b8..b2b5b70197b 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -457,11 +457,9 @@ ObjCInterfaceDecl::lookupNestedProtocol(IdentifierInfo *Name) { /// When argument category "C" is specified, any implicit method found /// in this category is ignored. ObjCMethodDecl *ObjCInterfaceDecl::lookupMethod(Selector Sel, - bool isInstance, - bool shallowCategoryLookup, - const ObjCCategoryDecl *C, - const ObjCProtocolDecl *P) const -{ + bool isInstance, + bool shallowCategoryLookup, + const ObjCCategoryDecl *C) const { // FIXME: Should make sure no callers ever do this. if (!hasDefinition()) return 0; @@ -472,23 +470,7 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupMethod(Selector Sel, if (data().ExternallyCompleted) LoadExternalDefinition(); - while (ClassDecl) { - // If we are looking for a method that is part of protocol conformance, - // check if the class has been marked to suppress conformance - // of that protocol. - if (P && ClassDecl->hasAttrs()) { - const AttrVec &V = ClassDecl->getAttrs(); - const IdentifierInfo *PI = P->getIdentifier(); - for (AttrVec::const_iterator I = V.begin(), E = V.end(); I != E; ++I) { - if (const ObjCSuppressProtocolAttr *A = - dyn_cast<ObjCSuppressProtocolAttr>(*I)){ - if (A->getProtocol() == PI) { - return 0; - } - } - } - } - + while (ClassDecl != NULL) { if ((MethodDecl = ClassDecl->getMethod(Sel, isInstance))) return MethodDecl; |