Please sign in to comment.
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231265 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information...
Showing with 536 additions and 10 deletions.
Oops, something went wrong.