diff options
author | Steve Naroff <snaroff@apple.com> | 2009-07-22 16:07:01 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-07-22 16:07:01 +0000 |
commit | 470301bac9c8abfc6b451b3b669c6695a9fd1518 (patch) | |
tree | 213cf3f06c974ae71f32bfc8683f88fbca108fed /lib/Sema/SemaExprObjC.cpp | |
parent | 5c7e281d368601858f9f5e5fe11734eea10b9523 (diff) |
Fix <rdar://problem/6770276> Support Class<Proto> syntax.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 068b386980..2d144100e5 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -512,8 +512,7 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel, } // Handle messages to id. - if (ReceiverCType == Context.getCanonicalType(Context.getObjCIdType()) || - ReceiverCType->isBlockPointerType() || + if (ReceiverCType->isObjCIdType() || ReceiverCType->isBlockPointerType() || Context.isObjCNSObjectType(RExpr->getType())) { ObjCMethodDecl *Method = LookupInstanceMethodInGlobalPool( Sel, SourceRange(lbrac,rbrac)); @@ -528,7 +527,8 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel, } // Handle messages to Class. - if (ReceiverCType == Context.getCanonicalType(Context.getObjCClassType())) { + if (ReceiverCType->isObjCClassType() || + ReceiverCType->isObjCQualifiedClassType()) { ObjCMethodDecl *Method = 0; if (ObjCMethodDecl *CurMeth = getCurMethodDecl()) { @@ -538,6 +538,9 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel, if (!Method) Method = LookupPrivateClassMethod(Sel, ClassDecl); + + // FIXME: if we still haven't found a method, we need to look in + // protocols (if we have qualifiers). } if (Method && DiagnoseUseOfDecl(Method, receiverLoc)) return true; |