forked from OSchip/llvm-project
A missing method in a messaging expression issues a warning, clients must not
crash because of this. llvm-svn: 44648
This commit is contained in:
parent
7f3587e344
commit
c277f6f351
|
@ -2242,6 +2242,10 @@ Sema::ExprResult Sema::ActOnInstanceMessage(
|
||||||
Diag(lbrac, diag::warn_method_not_found, std::string("-"), Sel.getName(),
|
Diag(lbrac, diag::warn_method_not_found, std::string("-"), Sel.getName(),
|
||||||
SourceRange(lbrac, rbrac));
|
SourceRange(lbrac, rbrac));
|
||||||
returnType = Context.getObjcIdType();
|
returnType = Context.getObjcIdType();
|
||||||
|
// Must have a dummy method declaration, so clients work as expected
|
||||||
|
Method = new ObjcMethodDecl(SourceLocation(), SourceLocation(), Sel,
|
||||||
|
returnType, ClassDecl, 0, -1, 0, true, false,
|
||||||
|
ObjcMethodDecl::None);
|
||||||
} else {
|
} else {
|
||||||
returnType = Method->getResultType();
|
returnType = Method->getResultType();
|
||||||
if (Sel.getNumArgs())
|
if (Sel.getNumArgs())
|
||||||
|
|
Loading…
Reference in New Issue