diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-03-16 20:34:23 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-03-16 20:34:23 +0000 |
| commit | 1dd77af9cedc07477d60e478809908d4cfecb955 (patch) | |
| tree | f0f28d31a59c6893dc0e1ae96ea5a394988910ac /clang/lib/Sema/SemaDeclObjC.cpp | |
| parent | 793ca20e2d2f1f82f887cfa8a6db6217ace05849 (diff) | |
| download | bcm5719-llvm-1dd77af9cedc07477d60e478809908d4cfecb955.tar.gz bcm5719-llvm-1dd77af9cedc07477d60e478809908d4cfecb955.zip | |
Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.
llvm-svn: 48426
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 28a92c7ba26..7bdfd9e014d 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -268,8 +268,8 @@ Sema::ActOnForwardProtocolDeclaration(SourceLocation AtProtocolLoc, Protocols.push_back(PDecl); } - return new ObjCForwardProtocolDecl(AtProtocolLoc, - &Protocols[0], Protocols.size()); + return ObjCForwardProtocolDecl::Create(Context, AtProtocolLoc, + &Protocols[0], Protocols.size()); } Sema::DeclTy *Sema::ActOnStartCategoryInterface( @@ -280,8 +280,9 @@ Sema::DeclTy *Sema::ActOnStartCategoryInterface( SourceLocation EndProtoLoc) { ObjCInterfaceDecl *IDecl = getObjCInterfaceDecl(ClassName); - ObjCCategoryDecl *CDecl = new ObjCCategoryDecl(AtInterfaceLoc, NumProtoRefs, - CategoryName); + ObjCCategoryDecl *CDecl = + ObjCCategoryDecl::Create(Context, AtInterfaceLoc, NumProtoRefs, + CategoryName); CDecl->setClassInterface(IDecl); /// Check that class of this category is already completely declared. @@ -605,7 +606,8 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc, Interfaces.push_back(IDecl); } - return new ObjCClassDecl(AtClassLoc, &Interfaces[0], Interfaces.size()); + return ObjCClassDecl::Create(Context, AtClassLoc, + &Interfaces[0], Interfaces.size()); } |

