aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Sema/SemaExpr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index ed71934621..95b900c677 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -2242,6 +2242,10 @@ Sema::ExprResult Sema::ActOnInstanceMessage(
Diag(lbrac, diag::warn_method_not_found, std::string("-"), Sel.getName(),
SourceRange(lbrac, rbrac));
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 {
returnType = Method->getResultType();
if (Sel.getNumArgs())