objc: allow block pointer matching 'id' type when
they show up as argument types of two block pointers.
// rdar://10734265


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149007 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 27bbc72..5a7a73d 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -5933,7 +5933,11 @@
       if (ETy->getDecl()->getIntegerType() == LHSCan.getUnqualifiedType())
         return LHS;
     }
-
+    // allow block pointer type to match an 'id' type.
+    if (OfBlockPointer && !BlockReturnType &&
+        LHS->isObjCIdType() && RHS->isBlockPointerType())
+      return LHS;
+    
     return QualType();
   }