summaryrefslogtreecommitdiffstats
path: root/clang/AST/Decl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-09-27 18:57:03 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-09-27 18:57:03 +0000
commitf6546b38b2f598aa8387ea6106392861b83c53ec (patch)
tree1be5424b30107e517f09e943cea87f256278e9b4 /clang/AST/Decl.cpp
parent65ca537b5552dfbb1c74beb312d54d215a99972c (diff)
downloadbcm5719-llvm-f6546b38b2f598aa8387ea6106392861b83c53ec.tar.gz
bcm5719-llvm-f6546b38b2f598aa8387ea6106392861b83c53ec.zip
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. llvm-svn: 42412
Diffstat (limited to 'clang/AST/Decl.cpp')
-rw-r--r--clang/AST/Decl.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/AST/Decl.cpp b/clang/AST/Decl.cpp
index 83762e94658..10da7b163ed 100644
--- a/clang/AST/Decl.cpp
+++ b/clang/AST/Decl.cpp
@@ -364,4 +364,23 @@ void ObjcCategoryDecl::ObjcAddCatMethods(ObjcMethodDecl **insMethods,
}
}
+/// 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*));
+ }
+}
+
OpenPOWER on IntegriCloud