]> granicus.if.org Git - clang/commitdiff
[AST] In ObjCInterfaceDecl::isDesignatedInitializer(), use getMethod() instead of...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 10 Dec 2013 18:36:43 +0000 (18:36 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 10 Dec 2013 18:36:43 +0000 (18:36 +0000)
lookupMethod also goes through categories, which we don't need there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196942 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclObjC.cpp

index eaf34c1de1af12fd8891c968d0c056885bd373e7..fb4b9dbd1f43a1afd3e4b5f30c13df7557c8c90c 100644 (file)
@@ -453,9 +453,7 @@ bool ObjCInterfaceDecl::isDesignatedInitializer(Selector Sel,
   if (!IFace)
     return false;
 
-  if (const ObjCMethodDecl *MD = IFace->lookupMethod(Sel, /*isInstance=*/true,
-                                                 /*shallowCategoryLookup=*/true,
-                                                 /*followSuper=*/false)) {
+  if (const ObjCMethodDecl *MD = IFace->getMethod(Sel, /*isInstance=*/true)) {
     if (MD->isThisDeclarationADesignatedInitializer()) {
       if (InitMethod)
         *InitMethod = MD;