diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-03-16 21:23:50 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-03-16 21:23:50 +0000 |
| commit | 41eec3d0979e80cbe7e754b4e3c85acc00cc8dd6 (patch) | |
| tree | 6300a33d4bc37b723fa42f5dee54cf6739ff689d /clang/lib/Sema/SemaDeclObjC.cpp | |
| parent | 219b3e9c6cc7965b375bf8d11bd30f78d5bae7fa (diff) | |
| download | bcm5719-llvm-41eec3d0979e80cbe7e754b4e3c85acc00cc8dd6.tar.gz bcm5719-llvm-41eec3d0979e80cbe7e754b4e3c85acc00cc8dd6.zip | |
make property addition work list all other "add" methods. Do
the allocation in the class, not in sema.
llvm-svn: 48433
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 121004db990..335122ebfa5 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -705,13 +705,8 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclTy *classDecl, // TODO: property declaration in category and protocols. if (pNum != 0) - if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) { - // FIXME: Move the memory allocation into setPropertyDecls! - ObjCPropertyDecl **properties = new ObjCPropertyDecl*[pNum]; - memcpy(properties, allProperties, pNum*sizeof(ObjCPropertyDecl*)); - IDecl->setPropertyDecls(properties); - IDecl->setNumPropertyDecl(pNum); - } + if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) + IDecl->addProperties((ObjCPropertyDecl**)allProperties, pNum); for (unsigned i = 0; i < allNum; i++ ) { ObjCMethodDecl *Method = |

