summaryrefslogtreecommitdiffstats
path: root/clang/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
commit5848d333b46ce61f27712050de2d5e1579c7456f (patch)
tree576f0ce81288dd67c86cf57ff71bbd7029db2236 /clang/lib/Sema/SemaObjCProperty.cpp
parent8ab959c9614533f418cfdda4e52ad0af5722114d (diff)
downloadbcm5719-llvm-5848d333b46ce61f27712050de2d5e1579c7456f.tar.gz
bcm5719-llvm-5848d333b46ce61f27712050de2d5e1579c7456f.zip
Check on property attributes which are declared
in class extensions (radar 8171968). llvm-svn: 108283
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index 44cd271753f..b2b6e13717e 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud