[Objective-C Sema]. Issue availability/deprecated warning when
there is a uinque method found when message is sent to receiver of 'id' type. // rdar://18848183 llvm-svn: 221562
This commit is contained in:
@@ -2448,10 +2448,14 @@ ExprResult Sema::BuildInstanceMessage(Expr *Receiver,
|
||||
Method = LookupFactoryMethodInGlobalPool(Sel,
|
||||
SourceRange(LBracLoc,RBracLoc),
|
||||
receiverIsId);
|
||||
if (Method)
|
||||
if (Method) {
|
||||
if (ObjCMethodDecl *BestMethod =
|
||||
SelectBestMethod(Sel, ArgsIn, Method->isInstanceMethod()))
|
||||
Method = BestMethod;
|
||||
SmallVector<ObjCMethodDecl*, 4> Methods;
|
||||
if (!CollectMultipleMethodsInGlobalPool(Sel, Methods, Method->isInstanceMethod()))
|
||||
DiagnoseUseOfDecl(Method, SelLoc);
|
||||
}
|
||||
} else if (ReceiverType->isObjCClassType() ||
|
||||
ReceiverType->isObjCQualifiedClassType()) {
|
||||
// Handle messages to Class.
|
||||
|
||||
Reference in New Issue
Block a user