diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-05-22 17:12:32 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-05-22 17:12:32 +0000 |
commit | db3a4c1388cd7188e243c16885e14d41e40ef850 (patch) | |
tree | 8bb75909d28bfa96f73913723a9673ac86d22e59 /clang/lib/AST/DeclObjC.cpp | |
parent | 781b75a7dff9d810cab5f4da005c22622911ee0e (diff) | |
download | bcm5719-llvm-db3a4c1388cd7188e243c16885e14d41e40ef850.tar.gz bcm5719-llvm-db3a4c1388cd7188e243c16885e14d41e40ef850.zip |
(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
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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, |