summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-04-14 23:36:35 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-04-14 23:36:35 +0000
commit0152a1a5db3f8a29b6795633a947ecbc7efc237e (patch)
tree46fb9250e1b65359e04a3fb9f7f2f1676b67977e /clang/lib/Sema/SemaDeclObjC.cpp
parente5f21cea3e8c3abee7ed46511a50924af228b5ec (diff)
downloadbcm5719-llvm-0152a1a5db3f8a29b6795633a947ecbc7efc237e.tar.gz
bcm5719-llvm-0152a1a5db3f8a29b6795633a947ecbc7efc237e.zip
New AST representation for each objc2's property declaration.
llvm-svn: 49699
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 7eb132ec404..bf9af85a6c6 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -886,13 +886,12 @@ Sema::DeclTy *Sema::ActOnMethodDeclaration(
return ObjCMethod;
}
-Sema::DeclTy *Sema::ActOnAddObjCProperties(Scope *S, SourceLocation AtLoc,
- FieldDeclarator *propertyDeclarators,
- unsigned NumPropertyDeclarators,
- ObjCDeclSpec &ODS) {
- FieldDeclarator &FD = propertyDeclarators[0];
+Sema::DeclTy *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc,
+ FieldDeclarator &FD,
+ ObjCDeclSpec &ODS) {
QualType T = GetTypeForDeclarator(FD.D, S);
- ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, AtLoc, T);
+ ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, AtLoc,
+ FD.D.getIdentifier(), T);
if (ODS.getPropertyAttributes() & ObjCDeclSpec::DQ_PR_readonly)
PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readonly);
@@ -922,16 +921,6 @@ Sema::DeclTy *Sema::ActOnAddObjCProperties(Scope *S, SourceLocation AtLoc,
if (ODS.getPropertyAttributes() & ObjCDeclSpec::DQ_PR_nonatomic)
PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_nonatomic);
- if (NumPropertyDeclarators != 0) {
- NamedDecl **propertyName = new NamedDecl*[NumPropertyDeclarators];
- PDecl->setPropertyDecls(propertyName);
- PDecl->setNumPropertyDecls(NumPropertyDeclarators);
- for (unsigned i = 0; i < NumPropertyDeclarators; i++) {
- Declarator &D = propertyDeclarators[i].D;
- propertyName[i] = new NamedDecl(Decl::ObjCProperty,
- D.getIdentifierLoc(), D.getIdentifier());
- }
- }
return PDecl;
}
OpenPOWER on IntegriCloud