Sema::ActOnClassMessage() needs to look through it's local implementation for private class methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51938 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 2f3949f..c9cfc92 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -170,6 +170,12 @@
   ObjCMethodDecl *Method = ClassDecl->lookupClassMethod(Sel);
   QualType returnType;
   
+  // If we have an implementation in scope, check "private" methods.
+  if (!Method) {
+    if (ObjCImplementationDecl *ImpDecl = 
+        ObjCImplementations[ClassDecl->getIdentifier()])
+      Method = ImpDecl->getClassMethod(Sel);
+  }
   // Before we give up, check if the selector is an instance method.
   if (!Method)
     Method = ClassDecl->lookupInstanceMethod(Sel);