diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-07-15 17:07:12 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-07-15 17:07:12 +0000 | 
| commit | 4e58654b47e89efbb1a8ca032c08fd354c3b0b61 (patch) | |
| tree | 5e946d69177464379cb1a38ac18206180d763639 /lib/Sema/SemaObjCProperty.cpp | |
| parent | 4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (diff) | |
Notes
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
| -rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 30 | 
1 files changed, 19 insertions, 11 deletions
| diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 44cd271753f3..ff60599b8510 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -52,18 +52,22 @@ Sema::DeclPtrTy Sema::ActOnProperty(Scope *S, SourceLocation AtLoc,      cast<ObjCContainerDecl>(ClassCategory.getAs<Decl>());    if (ObjCCategoryDecl *CDecl = dyn_cast<ObjCCategoryDecl>(ClassDecl)) -    if (CDecl->IsClassExtension()) -      return HandlePropertyInClassExtension(S, CDecl, AtLoc, -                                            FD, GetterSel, SetterSel, -                                            isAssign, isReadWrite, -                                            Attributes, -                                            isOverridingProperty, TSI, -                                            MethodImplKind); - +    if (CDecl->IsClassExtension()) { +      DeclPtrTy Res = HandlePropertyInClassExtension(S, CDecl, AtLoc, +                                           FD, GetterSel, SetterSel, +                                           isAssign, isReadWrite, +                                           Attributes, +                                           isOverridingProperty, TSI, +                                           MethodImplKind); +      if (Res) +        CheckObjCPropertyAttributes(Res, AtLoc, Attributes); +      return Res; +    } +      DeclPtrTy Res =  DeclPtrTy::make(CreatePropertyDecl(S, ClassDecl, AtLoc, FD, -                                            GetterSel, SetterSel, -                                            isAssign, isReadWrite, -                                            Attributes, TSI, MethodImplKind)); +                                              GetterSel, SetterSel, +                                              isAssign, isReadWrite, +                                              Attributes, TSI, MethodImplKind));    // Validate the attributes on the @property.    CheckObjCPropertyAttributes(Res, AtLoc, Attributes);    return Res; @@ -926,6 +930,10 @@ void Sema::DefaultSynthesizeProperties (Scope *S, ObjCImplDecl* IMPDecl,          Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional ||          IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier()))        continue; +    // Property may have been synthesized by user. +    if (IMPDecl->FindPropertyImplDecl(Prop->getIdentifier())) +      continue; +      ActOnPropertyImplDecl(S, IMPDecl->getLocation(), IMPDecl->getLocation(),                            true, DeclPtrTy::make(IMPDecl),                            Prop->getIdentifier(), Prop->getIdentifier()); | 
