forked from OSchip/llvm-project
Sema::ActOnClassMessage()...if a class method isn't found, lookup an instance method. Since all classes are also instances, this is appropriate.
llvm-svn: 43708
This commit is contained in:
parent
f8bc406d5d
commit
96d20616c4
|
@ -2063,6 +2063,10 @@ Sema::ExprResult Sema::ActOnClassMessage(
|
|||
ObjcInterfaceDecl* ClassDecl = getObjCInterfaceDecl(receiverName);
|
||||
ObjcMethodDecl *Method = ClassDecl->lookupClassMethod(Sel);
|
||||
QualType returnType;
|
||||
|
||||
// Before we give up, check if the selector is an instance method.
|
||||
if (!Method)
|
||||
Method = ClassDecl->lookupInstanceMethod(Sel);
|
||||
if (!Method) {
|
||||
Diag(lbrac, diag::warn_method_not_found, std::string("+"), Sel.getName(),
|
||||
SourceRange(lbrac, rbrac));
|
||||
|
|
Loading…
Reference in New Issue