summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-07-10 21:30:22 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-07-10 21:30:22 +0000
commit56f48d09f8cdb458de7d148e9449e6ccbb6e679a (patch)
tree1811a0e19dbc00415365cf8a86614ff468347d1c /clang/lib/AST/DeclObjC.cpp
parentef99752e69be2ae98b3113c4089f30152f0b9ff2 (diff)
downloadbcm5719-llvm-56f48d09f8cdb458de7d148e9449e6ccbb6e679a.tar.gz
bcm5719-llvm-56f48d09f8cdb458de7d148e9449e6ccbb6e679a.zip
ObjC migrator: Improve on hueristics.
migrate to 'copy attribute if Object class implements NSCopying otherwise assume implied 'strong'. Remove lifetime qualifier on property as it has moved to property's attribute. Added TODO comment for future work by poking into setter implementation. llvm-svn: 186037
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index 3895a520857..c15f01debaf 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -441,6 +441,17 @@ ObjCInterfaceDecl *ObjCInterfaceDecl::lookupInheritedClass(
return NULL;
}
+ObjCProtocolDecl *
+ObjCInterfaceDecl::lookupNestedProtocol(IdentifierInfo *Name) {
+ for (ObjCInterfaceDecl::all_protocol_iterator P =
+ all_referenced_protocol_begin(), PE = all_referenced_protocol_end();
+ P != PE; ++P)
+ if ((*P)->lookupProtocolNamed(Name))
+ return (*P);
+ ObjCInterfaceDecl *SuperClass = getSuperClass();
+ return SuperClass ? SuperClass->lookupNestedProtocol(Name) : NULL;
+}
+
/// lookupMethod - This method returns an instance/class method by looking in
/// the class, its categories, and its super classes (using a linear search).
/// When argument category "C" is specified, any implicit method found
OpenPOWER on IntegriCloud