diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index 31c09be7cb8b..fe96bea69363 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -2097,7 +2097,8 @@ Sema::ExprResult Sema::ActOnInstanceMessage( QualType returnType; ObjcMethodDecl *Method; - if (receiverType == Context.getObjcIdType()) { + if (receiverType == Context.getObjcIdType() || + receiverType == Context.getObjcClassType()) { Method = InstanceMethodPool[Sel].Method; if (!Method) { Diag(lbrac, diag::warn_method_not_found, std::string("-"), Sel.getName(),