Patch for method implementation. It populates ObjcImplementationDecl object with method implementation declarations .
It checks and warns on those methods declared in class interface and not implemented.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42412 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Decl.cpp b/AST/Decl.cpp
index 83762e9..10da7b1 100644
--- a/AST/Decl.cpp
+++ b/AST/Decl.cpp
@@ -364,4 +364,23 @@
}
}
+/// ObjcAddImplMethods - Insert instance and methods declarations into
+/// ObjcImplementationDecl's InsMethods and ClsMethods fields.
+///
+void ObjcImplementationDecl::ObjcAddImplMethods(ObjcMethodDecl **insMethods,
+ unsigned numInsMembers,
+ ObjcMethodDecl **clsMethods,
+ unsigned numClsMembers) {
+ NumInsMethods = numInsMembers;
+ if (numInsMembers) {
+ InsMethods = new ObjcMethodDecl*[numInsMembers];
+ memcpy(InsMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
+ }
+ NumClsMethods = numClsMembers;
+ if (numClsMembers) {
+ ClsMethods = new ObjcMethodDecl*[numClsMembers];
+ memcpy(ClsMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
+ }
+}
+