diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-06 18:58:12 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-06 18:58:12 +0000 |
| commit | b458ffb226f2056a2e873729dddcd9f7e22e74f2 (patch) | |
| tree | 071f519f7e9dfb88fb2cec8e6828a0dd1ca86610 /clang/lib | |
| parent | aa421ea8af28cd2a8ecb64310b9ecf9d70c9bb37 (diff) | |
| download | bcm5719-llvm-b458ffb226f2056a2e873729dddcd9f7e22e74f2.tar.gz bcm5719-llvm-b458ffb226f2056a2e873729dddcd9f7e22e74f2.zip | |
Make sure when setting AttributesAsWritten of a property that they do not
include ownership qualifiers from the type.
llvm-svn: 143885
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index ae054bc629d..46b2a086dd5 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -137,6 +137,7 @@ Decl *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, FD, GetterSel, SetterSel, isAssign, isReadWrite, Attributes, + ODS.getPropertyAttributes(), isOverridingProperty, TSI, MethodImplKind); if (Res) { @@ -150,7 +151,9 @@ Decl *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, ObjCPropertyDecl *Res = CreatePropertyDecl(S, ClassDecl, AtLoc, FD, GetterSel, SetterSel, isAssign, isReadWrite, - Attributes, TSI, MethodImplKind); + Attributes, + ODS.getPropertyAttributes(), + TSI, MethodImplKind); if (lexicalDC) Res->setLexicalDeclContext(lexicalDC); @@ -201,6 +204,7 @@ Sema::HandlePropertyInClassExtension(Scope *S, const bool isAssign, const bool isReadWrite, const unsigned Attributes, + const unsigned AttributesAsWritten, bool *isOverridingProperty, TypeSourceInfo *T, tok::ObjCKeywordKind MethodImplKind) { @@ -231,7 +235,7 @@ Sema::HandlePropertyInClassExtension(Scope *S, ObjCPropertyDecl::Create(Context, DC, FD.D.getIdentifierLoc(), PropertyId, AtLoc, T); PDecl->setPropertyAttributesAsWritten( - makePropertyAttributesAsWritten(Attributes)); + makePropertyAttributesAsWritten(AttributesAsWritten)); if (Attributes & ObjCDeclSpec::DQ_PR_readonly) PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readonly); if (Attributes & ObjCDeclSpec::DQ_PR_readwrite) @@ -260,7 +264,7 @@ Sema::HandlePropertyInClassExtension(Scope *S, ObjCPropertyDecl *PDecl = CreatePropertyDecl(S, CCPrimary, AtLoc, FD, GetterSel, SetterSel, isAssign, isReadWrite, - Attributes, T, MethodImplKind, DC); + Attributes,AttributesAsWritten, T, MethodImplKind, DC); // A case of continuation class adding a new property in the class. This // is not what it was meant for. However, gcc supports it and so should we. @@ -351,6 +355,7 @@ ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, const bool isAssign, const bool isReadWrite, const unsigned Attributes, + const unsigned AttributesAsWritten, TypeSourceInfo *TInfo, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC){ @@ -402,7 +407,7 @@ ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, PDecl->setGetterName(GetterSel); PDecl->setSetterName(SetterSel); PDecl->setPropertyAttributesAsWritten( - makePropertyAttributesAsWritten(Attributes)); + makePropertyAttributesAsWritten(AttributesAsWritten)); if (Attributes & ObjCDeclSpec::DQ_PR_readonly) PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readonly); |

