Teach Sema::ActOnInstanceMessage() about private methods. That is, methods declared in an implementation (but not listed in the interface).
This commit is only 95% of the bug fix. The last piece to this puzzle is to add the method decls to the implementation incrementally (as we encounter them). At the moment, the methods aren't added until we see an @end (which is too late).
I will complete this later...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43989 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 006bb18..e9c438f 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -1477,9 +1477,10 @@
new ObjcImplementationDecl(AtClassImplLoc, ClassName, IDecl, SDecl);
// Check that there is no duplicate implementation of this class.
- if (!ObjcImplementations.insert(ClassName))
+ if (ObjcImplementations[ClassName])
Diag(ClassLoc, diag::err_dup_implementation_class, ClassName->getName());
-
+ else // add it to the list.
+ ObjcImplementations[ClassName] = IMPDecl;
return IMPDecl;
}