summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-12-10 19:43:48 +0000
committerTed Kremenek <kremenek@apple.com>2013-12-10 19:43:48 +0000
commitf41cf7f10f76704b7037de9a8a7adcc114db1c46 (patch)
tree0f57c1a4e0271d7ae02d7a70d51f2276d5e40283 /clang/lib/AST/DeclObjC.cpp
parentd980da2290fda089a3156d0b23e928fcf99b270a (diff)
downloadbcm5719-llvm-f41cf7f10f76704b7037de9a8a7adcc114db1c46.tar.gz
bcm5719-llvm-f41cf7f10f76704b7037de9a8a7adcc114db1c46.zip
Rename attribute 'objc_suppress_protocol_methods' to 'objc_protocol_requires_explicit_implementation'.
That's a mouthful, and not necessarily the final name. This also reflects a semantic change where this attribute is now on the protocol itself instead of a class. This attribute will require that a protocol, when adopted by a class, is explicitly implemented by the class itself (instead of walking the super class chain). Note that this attribute is not "done". This should be considered a WIP. llvm-svn: 196955
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index fb4b9dbd1f4..3db1acf0039 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -256,18 +256,6 @@ ObjCContainerDecl::FindPropertyDeclaration(IdentifierInfo *PropertyId) const {
void ObjCInterfaceDecl::anchor() { }
-bool ObjCInterfaceDecl::shouldSuppressProtocol(const ObjCProtocolDecl *P) const{
- if (!hasAttrs())
- return false;
- const IdentifierInfo *PI = P->getIdentifier();
- for (specific_attr_iterator<ObjCSuppressProtocolAttr>
- I = specific_attr_begin<ObjCSuppressProtocolAttr>(),
- E = specific_attr_end<ObjCSuppressProtocolAttr>(); I != E; ++I)
- if ((*I)->getProtocol() == PI)
- return true;
- return false;
-}
-
/// FindPropertyVisibleInPrimaryClass - Finds declaration of the property
/// with name 'PropertyId' in the primary class; including those in protocols
/// (direct or indirect) used by the primary class.
@@ -555,8 +543,7 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupMethod(Selector Sel,
bool isInstance,
bool shallowCategoryLookup,
bool followSuper,
- const ObjCCategoryDecl *C,
- const ObjCProtocolDecl *P) const
+ const ObjCCategoryDecl *C) const
{
// FIXME: Should make sure no callers ever do this.
if (!hasDefinition())
@@ -569,12 +556,6 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupMethod(Selector Sel,
LoadExternalDefinition();
while (ClassDecl) {
- // If we are looking for a method that is part of protocol conformance,
- // check if the superclass has been marked to suppress conformance
- // of that protocol.
- if (P && ClassDecl->shouldSuppressProtocol(P))
- return 0;
-
if ((MethodDecl = ClassDecl->getMethod(Sel, isInstance)))
return MethodDecl;
OpenPOWER on IntegriCloud