This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() about private methods (r43989).

While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).

Other details...

- Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments.
- Removed Parser::AllImplMethods (a nice cleanup).
- Added location info to ObjcImplementationDecl (since we will need it very soon:-)
- Modified message.m test to no longer allow the bogus diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43995 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.h b/Sema/Sema.h
index de464c1..190302d 100644
--- a/Sema/Sema.h
+++ b/Sema/Sema.h
@@ -541,10 +541,9 @@
                                        llvm::SmallVector<DeclTy *, 8> & 
                                        Protocols);
 
-  virtual void ActOnAddMethodsToObjcDecl(Scope* S, DeclTy *ClassDecl, 
-				         DeclTy **allMethods, unsigned allNum,
-                                         DeclTy **allProperties, unsigned pNum,
-                                         SourceLocation AtEndLoc);
+  virtual void ActOnAtEnd(SourceLocation AtEndLoc, DeclTy *classDecl,
+                      DeclTy **allMethods = 0, unsigned allNum = 0,
+                      DeclTy **allProperties = 0, unsigned pNum = 0);
   
   virtual DeclTy *ActOnAddObjcProperties(SourceLocation AtLoc, 
                                          DeclTy **allProperties,