diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-03 00:01:38 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-03 00:01:38 +0000 |
| commit | a386d9533b2ec185ead655fb8c9de74a401d1bac (patch) | |
| tree | 6525cfe5fc93341dcbefd3d482c8cc429ffd72ec /clang/lib/Sema | |
| parent | 31e1d43729fa584f44e597d6d097e576d5635be2 (diff) | |
| download | bcm5719-llvm-a386d9533b2ec185ead655fb8c9de74a401d1bac.tar.gz bcm5719-llvm-a386d9533b2ec185ead655fb8c9de74a401d1bac.zip | |
Assortment of property attributes declared in continuation
class must match those of same property declared
in its primary class. (Fixes radar 7352425)
llvm-svn: 85843
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index f9f01681b93..46c6bf45ad1 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -1900,9 +1900,16 @@ Sema::DeclPtrTy Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, // with continuation class's readwrite property attribute! unsigned PIkind = PIDecl->getPropertyAttributes(); if (isReadWrite && (PIkind & ObjCPropertyDecl::OBJC_PR_readonly)) { - if ((Attributes & ObjCPropertyDecl::OBJC_PR_nonatomic) != - (PIkind & ObjCPropertyDecl::OBJC_PR_nonatomic)) + unsigned assignRetainCopyNonatomic = + (ObjCPropertyDecl::OBJC_PR_assign | + ObjCPropertyDecl::OBJC_PR_retain | + ObjCPropertyDecl::OBJC_PR_copy | + ObjCPropertyDecl::OBJC_PR_nonatomic); + if ((Attributes & assignRetainCopyNonatomic) != + (PIkind & assignRetainCopyNonatomic)) { Diag(AtLoc, diag::warn_property_attr_mismatch); + Diag(PIDecl->getLocation(), diag::note_property_declare); + } PIDecl->makeitReadWriteAttribute(); if (Attributes & ObjCDeclSpec::DQ_PR_retain) PIDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_retain); |

