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;
--- /dev/null
+// RUN: clang %s -fsyntax-only -verify
+
+@interface Whatever
+- copy;
+@end
+
+typedef long (^MyBlock)(id obj1, id obj2);
+
+void foo(MyBlock b) {
+ id bar = [b copy];
+}
+