Rewrite method definition bodies. Also renamed a method to distinguish between method declarations and definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44080 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/ParseObjc.cpp b/Parse/ParseObjc.cpp
index 19d32bd..2152601 100644
--- a/Parse/ParseObjc.cpp
+++ b/Parse/ParseObjc.cpp
@@ -1139,7 +1139,7 @@
 
 ///   objc-method-def: objc-method-proto ';'[opt] '{' body '}'
 ///
-void Parser::ParseObjCMethodDefinition() {
+Parser::DeclTy *Parser::ParseObjCMethodDefinition() {
   DeclTy *MDecl = ParseObjCMethodPrototype(ObjcImpDecl);
   // parse optional ';'
   if (Tok.is(tok::semi))
@@ -1154,7 +1154,7 @@
     
     // If we didn't find the '{', bail out.
     if (Tok.isNot(tok::l_brace))
-      return;
+      return 0;
   }
   SourceLocation BraceLoc = Tok.getLocation();
   
@@ -1176,6 +1176,7 @@
   
   // TODO: Pass argument information.
   Actions.ActOnFinishFunctionBody(MDecl, FnBody.Val);
+  return MDecl;
 }
 
 Parser::ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {