]> granicus.if.org Git - clang/commitdiff
Fix ObjCInterfaceDecl::getCategoryMethod() and give it a caller. No behavior change.
authorNico Weber <nicolasweber@gmx.de>
Mon, 2 Mar 2015 01:12:28 +0000 (01:12 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 2 Mar 2015 01:12:28 +0000 (01:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230928 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclObjC.h
lib/AST/DeclObjC.cpp

index 97ce132a762c457fbc3e5ffad6e43aa23ca5d9a1..3c24d05dc5b09487361a7fc8075386c7e578f6cb 100644 (file)
@@ -820,8 +820,8 @@ public:
   ObjCMethodDecl *getCategoryInstanceMethod(Selector Sel) const;
   ObjCMethodDecl *getCategoryClassMethod(Selector Sel) const;
   ObjCMethodDecl *getCategoryMethod(Selector Sel, bool isInstance) const {
-    return isInstance ? getInstanceMethod(Sel)
-                      : getClassMethod(Sel);
+    return isInstance ? getCategoryInstanceMethod(Sel)
+                      : getCategoryClassMethod(Sel);
   }
 
   typedef ObjCProtocolList::iterator protocol_iterator;
index 6e7478474d6f9dbcf0f1574cb89d2daad70f0b45..77995b5261f6ac8860ac936e5a61af468eb1ab0f 100644 (file)
@@ -616,8 +616,7 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupPrivateMethod(
 
   // Look through local category implementations associated with the class.
   if (!Method)
-    Method = Instance ? getCategoryInstanceMethod(Sel)
-                      : getCategoryClassMethod(Sel);
+    Method = getCategoryMethod(Sel, Instance);
 
   // Before we give up, check if the selector is an instance method.
   // But only in the root. This matches gcc's behavior and what the