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 | 36ac1cae1f3bf74f474b960c9c80d75f580154b3 (patch) | |
| tree | ca15aba1d13d4e837c69bbdc00acf92f02f1446b /clang/lib/Sema/SemaDeclObjC.cpp | |
| parent | d77aff8232b7eca4b1132d193958649e2f74aabf (diff) | |
| download | bcm5719-llvm-36ac1cae1f3bf74f474b960c9c80d75f580154b3.tar.gz bcm5719-llvm-36ac1cae1f3bf74f474b960c9c80d75f580154b3.zip | |
add two more Create methods.
llvm-svn: 48428
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index e07d3c59e67..f9da77ff2c5 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/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; |

