diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-03-22 23:25:52 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-03-22 23:25:52 +0000 |
| commit | 00c291b01299b42692c3fccffd630515809decc1 (patch) | |
| tree | 5ca7a9fcd424067e2721c6c125bae3d1ce9217a5 /clang/lib/Sema/SemaObjCProperty.cpp | |
| parent | b31c49a70d1cb3726461d47512bef2be8c124295 (diff) | |
| download | bcm5719-llvm-00c291b01299b42692c3fccffd630515809decc1.tar.gz bcm5719-llvm-00c291b01299b42692c3fccffd630515809decc1.zip | |
Set the relevent attributes declared in class extension
and fix a missing diagnostics on assigning to a read-only
property. Fixes radar 7766184.
llvm-svn: 99230
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 41ed6c630cb..030fdaafbc0 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -93,6 +93,11 @@ Sema::HandlePropertyInClassExtension(Scope *S, ObjCCategoryDecl *CDecl, ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, DC, FD.D.getIdentifierLoc(), PropertyId, AtLoc, T); + if (Attributes & ObjCDeclSpec::DQ_PR_readonly) + PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readonly); + if (Attributes & ObjCDeclSpec::DQ_PR_readwrite) + PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readwrite); + DC->addDecl(PDecl); // We need to look in the @interface to see if the @property was |

