]> granicus.if.org Git - clang/commit
[ObjC] Check written attributes only when synthesizing ambiguous property
authorAlex Lorenz <arphaman@gmail.com>
Tue, 22 Aug 2017 10:38:07 +0000 (10:38 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Tue, 22 Aug 2017 10:38:07 +0000 (10:38 +0000)
commitb97715b75d39c8706b749ebbfb3632bd53ea3475
tree70904389bfb256c5fc0ebe12012cf84494cb6251
parenta22fb7f2b228bf6340a192bac5defaecc4095e69
[ObjC] Check written attributes only when synthesizing ambiguous property

This commit fixes a bug introduced in r307903. The attribute ambiguity checker
that was introduced in r307903 checked all property attributes, which caused
errors for source-compatible properties, like:

@property (nonatomic, readonly) NSObject *prop;
@property (nonatomic, readwrite) NSObject *prop;

because the readwrite property would get implicit 'strong' attribute. The
ambiguity checker should be concerned about explicitly specified attributes
only.

rdar://33748089

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311443 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaObjCProperty.cpp
test/SemaObjC/arc-property-decl-attrs.m