aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-05-22 17:12:32 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-05-22 17:12:32 +0000
commitcd1876207f5564beba74e4b2524b664bdba0ba9f (patch)
treebdb47b5341150d2dcac2a93ce8f27126ac4cf919 /lib/AST/DeclObjC.cpp
parenta558a897cbe83a21914058348ffbdcf827530ad4 (diff)
(Next runtime only) check to see if class implements forwardInvocation method
and objects of this class are derived from 'NSProxy'. Under such conditions, which means that every method possible is implemented in the class, we should not issue "Method definition not found" warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index bcd2e08f6d..f4bb895730 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -161,6 +161,20 @@ ObjCIvarDecl *ObjCInterfaceDecl::lookupInstanceVariable(
return NULL;
}
+/// lookupInheritedClass - This method returns ObjCInterfaceDecl * of the super
+/// class whose name is passed as argument. If it is not one of the super classes
+/// the it returns NULL.
+ObjCInterfaceDecl *ObjCInterfaceDecl::lookupInheritedClass(
+ const IdentifierInfo*ICName) {
+ ObjCInterfaceDecl* ClassDecl = this;
+ while (ClassDecl != NULL) {
+ if (ClassDecl->getIdentifier() == ICName)
+ return ClassDecl;
+ ClassDecl = ClassDecl->getSuperClass();
+ }
+ return NULL;
+}
+
/// lookupInstanceMethod - This method returns an instance method by looking in
/// the class, its categories, and its super classes (using a linear search).
ObjCMethodDecl *ObjCInterfaceDecl::lookupInstanceMethod(ASTContext &Context,