summaryrefslogtreecommitdiffstats
path: root/clang/test/ARCMT/objcmt-subscripting-literals.m
Commit message (Collapse)AuthorAgeFilesLines
* [Edit] Fix issue with tracking what macro argument inputs have been edited.Argyrios Kyrtzidis2015-09-111-0/+2
| | | | | | This was not working correctly, leading to erroneously rejecting valid edits. llvm-svn: 247462
* [objcmt] Fix a mishandled conversion to objc directory literal.Argyrios Kyrtzidis2013-04-061-0/+1
| | | | | | rdar://13181413 llvm-svn: 178942
* [objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a ↵Argyrios Kyrtzidis2013-01-161-0/+4
| | | | | | | | | | | | | | | | | | dictionary literal if we can see the elements of the arrays. for example: NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:[NSArray arrayWithObjects:@"A", @"B", nil]]; --> NSDictionary *dict = @{ @"A" : @"1", @"B" : @"2" }; rdar://12428166 llvm-svn: 172679
* [objcmt] Check for classes that accept 'objectForKey:' (or the other selectorsArgyrios Kyrtzidis2012-07-061-0/+10
| | | | | | | | | | | | that the migrator handles) but return their instances as 'id', resulting in the compiler resolving 'objectForKey:' as the method from NSDictionary. When checking if we can convert to subscripting syntax, check whether the receiver is a result of a class method from a hardcoded list of such classes. In such a case return the specific class as the interface of the receiver. llvm-svn: 159788
* [objcmt] Allow migrating to subscripting syntax for other classesArgyrios Kyrtzidis2012-07-051-0/+42
| | | | | | | | | (apart from NSDictionary/NSArray) that implement objectForKey:/objectAtIndex/etc. and the subscripting methods as well. Part of rdar://11734969 llvm-svn: 159783
* [objcmt] When checking whether the subscripting methods are declared useArgyrios Kyrtzidis2012-06-191-7/+19
| | | | | | | | | ObjCInterfaceDec::lookupInstanceMethod to make sure we check categories as well and update related tests. rdar://11695288 llvm-svn: 158697
* [objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.Argyrios Kyrtzidis2012-05-221-1/+4
| | | | | | rdar://11501256 llvm-svn: 157227
* [objcmt] When rewriting to subscripting syntax, make sure we putArgyrios Kyrtzidis2012-05-141-0/+2
| | | | | | | | the receiver in parentheses when necessary. Part of rdar://11438360 llvm-svn: 156789
* [objcmt] When rewriting to array/dictionary literals, add an explicitArgyrios Kyrtzidis2012-05-141-0/+17
| | | | | | | | cast to 'id' for any argument that requires it. Part of rdar://11438360. llvm-svn: 156782
* [objcmt] Add a triple to test/ARCMT/objcmt-subscripting-literals.mArgyrios Kyrtzidis2012-03-061-1/+1
| | | | llvm-svn: 152151
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-0/+137
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
OpenPOWER on IntegriCloud