Objective-C properties: merge attributes when redeclaring 'readonly' as 'readwrite...
authorDouglas Gregor <dgregor@apple.com>
Thu, 10 Dec 2015 23:02:09 +0000 (23:02 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 10 Dec 2015 23:02:09 +0000 (23:02 +0000)
commit9dd25b76964280b01964faa1724131c9eaa840c5
treed6f91da677a974ff0ddbcc81982e0e6fb8dc14dd
parentf5d34b7b9d8b6c357977357bfa5159269a248c8c
Objective-C properties: merge attributes when redeclaring 'readonly' as 'readwrite' in an extension.

r251874 stopped back-patching the AST when an Objective-C 'readonly'
property is redeclared in a class extension as 'readwrite'. However,
it did not properly handle merging of Objective-C property attributes
(e.g., getter name, ownership, atomicity) to the redeclaration,
leading to bad metadata. Merge (and check!) those property attributes
so we get the right metadata and reasonable ASTs. Fixes
rdar://problem/23823989.

llvm-svn: 255309
clang/include/clang/AST/DeclObjC.h
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseObjc.cpp
clang/lib/Sema/SemaObjCProperty.cpp
clang/test/CodeGenObjC/property-list-in-extension.m
clang/test/SemaObjC/property-3.m
clang/test/SemaObjC/property-atomic-redecl.m