diff options
| author | Alex Denisov <1101.debian@gmail.com> | 2015-03-04 17:55:52 +0000 | 
|---|---|---|
| committer | Alex Denisov <1101.debian@gmail.com> | 2015-03-04 17:55:52 +0000 | 
| commit | e1d882c726b53eebe4dbece9fdf7fb8dc6469f72 (patch) | |
| tree | 60507712962fd8ed3cca070487229c64a1052884 /llvm/lib/CodeGen/MachineDominators.cpp | |
| parent | 4d9347993bbaaf9278df52d14e71e460a4afbd9f (diff) | |
| download | bcm5719-llvm-e1d882c726b53eebe4dbece9fdf7fb8dc6469f72.tar.gz bcm5719-llvm-e1d882c726b53eebe4dbece9fdf7fb8dc6469f72.zip | |
New ObjC warning: circular containers.
This commit adds new warning to prevent user from creating 'circular containers'.
Mutable collections from NSFoundation allows user to add collection to itself, e.g.: 
NSMutableArray *a = [NSMutableArray new]; 
[a addObject:a]; 
The code above leads to really weird behaviour (crashes, 'endless' recursion) and 
retain cycles (collection retains itself) if ARC enabled.
Patch checks the following collections: 
  - NSMutableArray, 
  - NSMutableDictionary, 
  - NSMutableSet, 
  - NSMutableOrderedSet, 
  - NSCountedSet. 
llvm-svn: 231265
Diffstat (limited to 'llvm/lib/CodeGen/MachineDominators.cpp')
0 files changed, 0 insertions, 0 deletions

