EnterScope(Scope::FnScope|Scope::DeclScope);
// Tell the actions module that we have entered a method definition with the
- // specified Declarator for the method.
- Actions.ObjCActOnStartOfMethodDef(CurScope, MDecl);
+ // specified Declarator for the method. If we don't have an MDecl, avoid
+ // calling the actions module.
+ if (MDecl)
+ Actions.ObjCActOnStartOfMethodDef(CurScope, MDecl);
StmtResult FnBody = ParseCompoundStatementBody();
ExitScope();
// TODO: Pass argument information.
- Actions.ActOnFinishFunctionBody(MDecl, FnBody.Val);
+ if (MDecl)
+ Actions.ActOnFinishFunctionBody(MDecl, FnBody.Val);
return MDecl;
}