From db3a4c1388cd7188e243c16885e14d41e40ef850 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 22 May 2009 17:12:32 +0000 Subject: (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. llvm-svn: 72267 --- clang/lib/AST/DeclObjC.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'clang/lib/AST/DeclObjC.cpp') diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index bcd2e08f6d6..f4bb8957307 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/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, -- cgit v1.2.3