llvm-project/clang/lib/ARCMigrate
Douglas Gregor acf4fd3039 Stop back-patching 'readonly' Objective-C properties with 'readwrite' ones.
A 'readonly' Objective-C property declared in the primary class can
effectively be shadowed by a 'readwrite' property declared within an
extension of that class, so long as the types and attributes of the
two property declarations are compatible.

Previously, this functionality was implemented by back-patching the
original 'readonly' property to make it 'readwrite', destroying source
information and causing some hideously redundant, incorrect
code. Simplify the implementation to express how this should actually
be modeled: as a separate property declaration in the extension that
shadows (via the name lookup rules) the declaration in the primary
class. While here, correct some broken Fix-Its, eliminate a pile of
redundant code, clean up the ARC migrator's handling of properties
declared in extensions, and fix debug info's naming of methods that
come from categories.

A wonderous side effect of doing this write is that it eliminates the
"AddedObjCPropertyInClassExtension" method from the AST mutation
listener, which in turn eliminates the last place where we rewrite
entire declarations in a chained PCH file or a module file. This
change (which fixes rdar://problem/18475765) will allow us to
eliminate the rewritten-decls logic from the serialization library,
and fixes a crash (rdar://problem/23247794) illustrated by the
test/PCH/chain-categories.m example.

llvm-svn: 251874
2015-11-03 01:15:46 +00:00
..
ARCMT.cpp Watch and TV OS: wire up basic ABI choices 2015-10-30 16:30:36 +00:00
ARCMTActions.cpp Introduce a PCHContainerOperations interface (NFC). 2015-06-20 18:53:08 +00:00
CMakeLists.txt Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
FileRemapper.cpp Fix a small bug in clang where generating some temporary files would have an extra period before the extension. 2015-09-09 16:48:47 +00:00
Internals.h Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 06:28:36 +00:00
Makefile
ObjCMT.cpp Replace double negation of !FileID.isInvalid() with FileID.isValid(). 2015-10-03 10:46:20 +00:00
PlistReporter.cpp Fix layering violation: include/clang/Basic/PlistSupport.h should not include 2015-01-28 20:14:54 +00:00
TransAPIUses.cpp [modules] Stop trying to fake up a linear MacroDirective history. 2015-04-29 23:20:19 +00:00
TransARCAssign.cpp s/tranform/transform/ 2012-11-14 15:08:31 +00:00
TransAutoreleasePool.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
TransBlockObjCVariable.cpp [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. 2014-03-14 18:34:04 +00:00
TransEmptyStatementsAndDealloc.cpp [C++11] Use 'nullptr'. 2014-05-07 06:21:57 +00:00
TransGCAttrs.cpp [C++11] Use 'nullptr'. 2014-05-07 06:21:57 +00:00
TransGCCalls.cpp Get ARCMT/GC-check-warn-nsalloc.m working 2014-05-19 22:51:11 +00:00
TransProperties.cpp Stop back-patching 'readonly' Objective-C properties with 'readwrite' ones. 2015-11-03 01:15:46 +00:00
TransProtectedScope.cpp [C++11] Use 'nullptr'. 2014-05-07 06:21:57 +00:00
TransRetainReleaseDealloc.cpp [AST] Remove StmtRange in favor of an iterator_range. 2015-07-18 17:09:36 +00:00
TransUnbridgedCasts.cpp [C++11] Use 'nullptr'. 2014-05-07 06:21:57 +00:00
TransUnusedInitDelegate.cpp [modules] Stop trying to fake up a linear MacroDirective history. 2015-04-29 23:20:19 +00:00
TransZeroOutPropsInDealloc.cpp [C++11] Use 'nullptr'. 2014-05-07 06:21:57 +00:00
TransformActions.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00
Transforms.cpp Watch and TV OS: wire up basic ABI choices 2015-10-30 16:30:36 +00:00
Transforms.h [modules] Stop trying to fake up a linear MacroDirective history. 2015-04-29 23:20:19 +00:00