aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTContext.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 27bbc72e88..5a7a73d3e8 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -5933,7 +5933,11 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS,
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();
}