summaryrefslogtreecommitdiffstats
path: root/clang/test/ARCMT
Commit message (Collapse)AuthorAgeFilesLines
...
* ObjectiveC migration. Check-in patch reverted in r187634.Fariborz Jahanian2013-08-023-1/+153
| | | | | | Also removed check for "NS" prefix for class name. llvm-svn: 187655
* Revert "ObjectiveC migrator. Migrate to instancetype return type for mehods ↵Rafael Espindola2013-08-022-77/+1
| | | | | | | | | | with certain prefix selector matching their class names' suffix." This reverts commit r187626. It is breaking the bots. llvm-svn: 187634
* ObjectiveC migrator. Migrate to instancetype return typeFariborz Jahanian2013-08-012-1/+77
| | | | | | | for mehods with certain prefix selector matching their class names' suffix. llvm-svn: 187626
* Objective-C migrator: some cleanup.Fariborz Jahanian2013-07-241-9/+9
| | | | | | | | Expose static type of init/alloc/retain with instance type as well. Ad-hoc cases are coming next. llvm-svn: 187068
* ObjectiveC migration: Method candidates for Fariborz Jahanian2013-07-242-4/+4
| | | | | | | migrating to instancetype can have implicit 'id' type too. llvm-svn: 187062
* ObjectiveC migration: more migration toFariborz Jahanian2013-07-231-6/+6
| | | | | | instancetype of NSDictionary methods. llvm-svn: 187008
* ObjectiveC migrator: start migrating toFariborz Jahanian2013-07-232-0/+166
| | | | | | instancetype methods. llvm-svn: 187004
* ObjectiveC migration. Better handle migration to conformingFariborz Jahanian2013-07-222-0/+70
| | | | | | | protocols by ignoring cases where all protocol properties and methods are optional. llvm-svn: 186895
* Objective-C migration: Use NS_OPTIONS when enumeratorsFariborz Jahanian2013-07-222-14/+62
| | | | | | have shift/bitwise operators or are power of 2. llvm-svn: 186856
* [arcmt] Only disable ARC in the second compilation if there were actually ↵Argyrios Kyrtzidis2013-07-221-0/+4
| | | | | | | | ARC errors in the checking phase. rdar://14490204 llvm-svn: 186850
* ObjectiveC migrator: Another use case of enumFariborz Jahanian2013-07-192-0/+16
| | | | | | declaration which can be migrated to NS_ENUM. llvm-svn: 186716
* [arcmt] After checking is successful disable auto-synthesize to avoid ↵Argyrios Kyrtzidis2013-07-191-0/+47
| | | | | | | | | | "@synthesize of 'weak' property is only allowed in ARC" errors. rdar://14461559 llvm-svn: 186709
* Fixes an ObjC migrator crash when last declFariborz Jahanian2013-07-192-0/+10
| | | | | | in file is an enum. llvm-svn: 186700
* ObjectiveC migrator: add support to migrate toFariborz Jahanian2013-07-192-0/+32
| | | | | | NS_OPTIONS. llvm-svn: 186641
* ObjectiveC migrator: Remove semicolon after the typedefFariborz Jahanian2013-07-181-1/+1
| | | | | | | declaration when converting to NS_ENUM. This required some code refactoring. llvm-svn: 186619
* ObjectiveC migration. migration to NS_ENUM/SN_OPTIONFariborz Jahanian2013-07-182-0/+26
| | | | | | - wip. llvm-svn: 186604
* ObjectiveC migrator: When adding conforming protocol,Fariborz Jahanian2013-07-172-0/+32
| | | | | | | only add outer-most conforming protocols as adding others are redundant. llvm-svn: 186473
* ObjectiveC migrator. If a class implements a protocol'sFariborz Jahanian2013-07-162-0/+30
| | | | | | properties, then class conforms to that protocol. llvm-svn: 186460
* ObjectiveC migration: complete migrating classFariborz Jahanian2013-07-162-0/+96
| | | | | | | declaration to include list of protocols class conforms to. llvm-svn: 186443
* ObjC migrator: Improve on hueristics.Fariborz Jahanian2013-07-102-8/+24
| | | | | | | | | | | | migrate to 'copy attribute if Object class implements NSCopying otherwise assume implied 'strong'. Remove lifetime qualifier on property as it has moved to property's attribute. Added TODO comment for future work by poking into setter implementation. llvm-svn: 186037
* objc migrator: More refinment of propertyFariborz Jahanian2013-07-101-5/+5
| | | | | | | attributes in migration. Specialli use of 'copy' attribute for retainable object types. llvm-svn: 185985
* ObjC migrator: Add -objcmt-migrate-property to do propertyFariborz Jahanian2013-07-092-2/+2
| | | | | | | migration. Also, fixes an old bug where older migration flags were not being checked for properly. llvm-svn: 185948
* ObjC migration: more test for migration toFariborz Jahanian2013-07-082-0/+38
| | | | | | properties. llvm-svn: 185884
* ObjC migration: Skip over setter/getter with attributesFariborz Jahanian2013-07-082-0/+20
| | | | | | for now. llvm-svn: 185879
* [Objective-C migrator] replace candidate user setter/getter withFariborz Jahanian2013-07-082-0/+40
| | | | | | their equivalent property declaration. wip. llvm-svn: 185873
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-041-1/+1
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
* [arcmt/driver] For the -ccc-arcmt-* flags, claim them when -fno-objc-arc is ↵Argyrios Kyrtzidis2013-06-241-0/+3
| | | | | | | | | | passed to avoid the "argument unused during compilation" warning. rdar://14240566 llvm-svn: 184776
* Point diagnostics that complain about a use of a selector in an objc ↵Argyrios Kyrtzidis2013-05-012-9/+9
| | | | | | | | | | | | message, to the selector location. Previously it would point to the left bracket or the receiver, which can be particularly problematic if the receiver is a block literal and we end up point the diagnostic far away for the selector that is complaining about. rdar://13620447 llvm-svn: 180833
* [objcmt] Fix a mishandled conversion to objc directory literal.Argyrios Kyrtzidis2013-04-062-0/+2
| | | | | | rdar://13181413 llvm-svn: 178942
* [arcmt] Make sure the function has an associated parameter for the argumentArgyrios Kyrtzidis2013-02-141-0/+9
| | | | | | | | before checking for its attributes. rdar://13192395 llvm-svn: 175184
* [arcmt] Make sure the objc migrators work fine when used with a PCH.Argyrios Kyrtzidis2013-02-054-0/+55
| | | | | | rdar://13140508 llvm-svn: 174386
* Undo my re-wording of the "ARC forbids Objective-C objects in ..."Douglas Gregor2013-01-281-1/+1
| | | | | | error. Jordan is right. llvm-svn: 173713
* Forbid the use of objects in unions in Objective-C++ ARC. FixesDouglas Gregor2013-01-281-1/+1
| | | | | | <rdar://problem/13098104>. llvm-svn: 173708
* [objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a ↵Argyrios Kyrtzidis2013-01-164-0/+12
| | | | | | | | | | | | | | | | | | 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
* [arcmt] Follow-up for r171484; make sure when adding brackets enclosing case ↵Argyrios Kyrtzidis2013-01-083-2/+5
| | | | | | | | | statements, that the case does not "contain" a declaration that is referenced "outside" of it, otherwise we will emit un-compilable code. llvm-svn: 171828
* [arcmt] Allow removing an -autorelease of a variable initialized in the ↵Argyrios Kyrtzidis2013-01-042-0/+9
| | | | | | | | previous statement. rdar://11074996 llvm-svn: 171485
* [arcmt] Adds brackets in case statements that "contain" initialization of ↵Argyrios Kyrtzidis2013-01-043-5/+78
| | | | | | | | | | retaining variable, thus emitting the "switch case is in protected scope" error. rdar://12952016 llvm-svn: 171484
* [arcmt] Don't error if an autoreleased variable is returned after the ↵Argyrios Kyrtzidis2013-01-042-0/+9
| | | | | | | | -autorelease. rdar://12952025 llvm-svn: 171482
* [arcmt] Rewrite uses of Block_copy/Block_release macros.Argyrios Kyrtzidis2013-01-033-0/+38
| | | | | | | | | | | | c = Block_copy(b); Block_release(c); ----> c = [b copy]; <removed> rdar://9408211 llvm-svn: 171454
* Change VerifyDiagnosticConsumer so that it *must* contain at least one ↵Andy Gibbs2012-10-191-2/+3
| | | | | | | | | | "expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive. This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file. Patch reviewed by David Blaikie. llvm-svn: 166281
* objective-C arc: remove -Warc-abi in its entirety.Fariborz Jahanian2012-09-141-16/+11
| | | | | | // rdar://10554025 llvm-svn: 163917
* Update VerifyDiagnosticConsumer to only get directives during parsing.Jordan Rose2012-08-101-0/+13
| | | | | | | | | | | | | | | | | | | | The old behavior was to re-scan any files (like modules) where we may have directives but won't actually be parsing during the -verify invocation. Now, we keep the old behavior in Debug builds as a sanity check (though modules are a known entity), and expect all legitimate directives to come from comments seen by the preprocessor. This also affects the ARC migration tool, which captures diagnostics in order to filter some out. This change adds an explicit cleanup to CaptureDiagnosticsConsumer in order to let its sub-consumer handle the real end of diagnostics. This was originally split into four patches, but the tests do not run cleanly without all four, so I've combined them into one commit. Patches by Andy Gibbs, with slight modifications from me. llvm-svn: 161650
* objective-c arc: ARC IRGen correctly assumes resultFariborz Jahanian2012-07-304-10/+2
| | | | | | | | | | type of generated call to super dealloc is 'void' and asserts if user's dealloc is not of 'void type. This rule must be enforced in clang front-end (with a fixit) if this is not the case, instead of asserting in CodeGen. // rdar://11987838 llvm-svn: 160993
* revert r160839 for now.Fariborz Jahanian2012-07-273-3/+10
| | | | llvm-svn: 160895
* objc-arc: When objects with known CF semantics are assigned toFariborz Jahanian2012-07-263-10/+3
| | | | | | | | retainable types in arc, only suggest CFBridgingRelease/ CFBridgingRetain and not the confusing __bridge casts. // rdar://11923822 llvm-svn: 160839
* Let Expr::HasSideEffects() return false for NULL, bool literals, this, and ↵Nico Weber2012-07-201-1/+1
| | | | | | | | nullptr. Fixes PR13413, -Wunused-private-field now warns on unused fields initialized to NULL. llvm-svn: 160541
* [objcmt] Check for classes that accept 'objectForKey:' (or the other selectorsArgyrios Kyrtzidis2012-07-062-0/+20
| | | | | | | | | | | | 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-052-0/+84
| | | | | | | | | (apart from NSDictionary/NSArray) that implement objectForKey:/objectAtIndex/etc. and the subscripting methods as well. Part of rdar://11734969 llvm-svn: 159783
* objective-c: Refactor parse/sema portion ofFariborz Jahanian2012-07-031-1/+1
| | | | | | | objective-c's fast enumeration statement, for more work to come. llvm-svn: 159689
* [objcmt] Have the modern objc migration warning change from:Argyrios Kyrtzidis2012-06-202-2/+2
| | | | | | | | | | | | | | | [NSNumber numberWithDouble:cppb]; warning: converting to boxing syntax requires a cast to something like: [NSNumber numberWithDouble:cppb]; warning: converting to boxing syntax requires casting 'bool' to 'double' This is way better to fully understand the warning. rdar://11705106 llvm-svn: 158783
OpenPOWER on IntegriCloud