aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-07-13 22:04:56 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-07-13 22:04:56 +0000
commitae415dc21ee6402cee1675ec8bb965a24f9e5b6b (patch)
treed68365bf22ec4c9de4f497fa6c32da2e406f53a2 /lib/Sema/SemaObjCProperty.cpp
parent09faeabf39a6fab2e2beb6bf03da970c17d2049a (diff)
Check on property attributes which are declared
in class extensions (radar 8171968). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 44cd271753..b2b6e13717 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;