aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-09-29 16:51:41 +0000
committerSteve Naroff <snaroff@apple.com>2008-09-29 16:51:41 +0000
commit6c4088e5fc0ce98bf3213d47f6f38bfbfa20c813 (patch)
tree73eafd520eccac59f814ad773f3f767b7ec6d688 /lib
parenta30730e5cd1aac279bf901050f8f0b6f22516010 (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaExprObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index a2a3992bab..db83405283 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -281,7 +281,8 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
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;