]> granicus.if.org Git - clang/commit
Objective-C properties: loosen 'atomic' checking for readonly properties.
authorDouglas Gregor <dgregor@apple.com>
Wed, 9 Dec 2015 22:57:32 +0000 (22:57 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 9 Dec 2015 22:57:32 +0000 (22:57 +0000)
commitb0c70192625fc2eaea3a4df4f1d9e2a639afc34b
tree33fe28fc533db7ee42b308db314a7b0597562df7
parenta2a83e07db6ff089845b3deec541496e1c745ff7
Objective-C properties: loosen 'atomic' checking for readonly properties.

r251874 reworked the way we handle properties declared within
Objective-C class extensions, which had the effective of tightening up
property checking in a number of places. In this particular class of
cases, we end up complaining about "atomic" mismatches between an
implicitly-atomic, readonly property and a nonatomic, readwrite
property, which doesn't make sense because "atomic" is essentially
irrelevant to readonly properties.

Therefore, suppress this diagnostic when the readonly property is
implicitly atomic. Fixes rdar://problem/23803109.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255174 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaObjCProperty.cpp
test/SemaObjC/property-3.m
test/SemaObjC/property-atomic-redecl.m [new file with mode: 0644]
test/SemaObjC/property-in-class-extension-1.m