Fix <rdar://problem/6251012> clang: Blocks are objects too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56791 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index a2a3992..db83405 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -281,7 +281,8 @@
     Context.getCanonicalType(RExpr->getType()).getUnqualifiedType();
   
   // Handle messages to id.
-  if (ReceiverCType == Context.getCanonicalType(Context.getObjCIdType())) {
+  if (ReceiverCType == Context.getCanonicalType(Context.getObjCIdType()) ||
+      ReceiverCType->getAsBlockPointerType()) {
     ObjCMethodDecl *Method = InstanceMethodPool[Sel].Method;
     if (!Method)
       Method = FactoryMethodPool[Sel].Method;