diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-16 20:53:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-16 20:53:07 +0000 |
commit | 75c9cae5f85c72cbb1649e93849e16ede3f07522 (patch) | |
tree | b2df5fb8ba5877b81749e8d36c4fc2e1564c8667 /lib/Sema/SemaDeclObjC.cpp | |
parent | 68c82cf61228102aba1194efef222fa1478af2a8 (diff) |
add two more Create methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index e07d3c59e6..f9da77ff2c 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -330,8 +330,8 @@ Sema::DeclTy *Sema::ActOnStartCategoryImplementation( IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc) { ObjCInterfaceDecl *IDecl = getObjCInterfaceDecl(ClassName); - ObjCCategoryImplDecl *CDecl = new ObjCCategoryImplDecl(AtCatImplLoc, - CatName, IDecl); + ObjCCategoryImplDecl *CDecl = + ObjCCategoryImplDecl::Create(Context, AtCatImplLoc, CatName, IDecl); /// Check that class of this category is already completely declared. if (!IDecl || IDecl->isForwardDecl()) Diag(ClassLoc, diag::err_undef_interface, ClassName->getName()); @@ -401,10 +401,12 @@ Sema::DeclTy *Sema::ActOnStartClassImplementation( } ObjCImplementationDecl* IMPDecl = - new ObjCImplementationDecl(AtClassImplLoc, ClassName, IDecl, SDecl); + ObjCImplementationDecl::Create(Context, AtClassImplLoc, ClassName, + IDecl, SDecl); // Check that there is no duplicate implementation of this class. if (ObjCImplementations[ClassName]) + // FIXME: Don't leak everything! Diag(ClassLoc, diag::err_dup_implementation_class, ClassName->getName()); else // add it to the list. ObjCImplementations[ClassName] = IMPDecl; |