summaryrefslogtreecommitdiffstats
path: root/clang/test/ARCMT
Commit message (Collapse)AuthorAgeFilesLines
...
* [arcmt] When migrating to ARC disable -Werror so as to only block migrationArgyrios Kyrtzidis2012-06-201-1/+11
| | | | | | | | for "hard" ARC errors, not warnings. rdar://11691437 llvm-svn: 158781
* [objcmt] When checking whether the subscripting methods are declared useArgyrios Kyrtzidis2012-06-194-28/+76
| | | | | | | | | ObjCInterfaceDec::lookupInstanceMethod to make sure we check categories as well and update related tests. rdar://11695288 llvm-svn: 158697
* [arcmt] At an unbridged cast error, if we're returning a load-of-ivar from a ↵Argyrios Kyrtzidis2012-06-073-15/+70
| | | | | | | | | | +0 method, automatically insert a __bridge cast. radar://11560638 llvm-svn: 158127
* [objcmt] When in ARC mode, also convert "[[.. alloc] init]" messages to ↵Argyrios Kyrtzidis2012-06-062-0/+188
| | | | | | | | | | literals, since the change from +1 to +0 will be handled fine by ARC. rdar://11606358 llvm-svn: 158114
* objective-c: merge deprecated/unavailable attributes toFariborz Jahanian2012-06-051-7/+11
| | | | | | | the overriding deprecated/unavailable method. // rdar://11475360 llvm-svn: 158022
* [objcmt] Don't migrate to subscripting syntax if the required methods have notArgyrios Kyrtzidis2012-06-042-0/+158
| | | | | | | | been declared on NSArray/NSDictionary. rdar://11581975 llvm-svn: 157951
* [arcmt] Use CFBridgingRetain/CFBridgingRelease instead of ↵Argyrios Kyrtzidis2012-06-013-17/+40
| | | | | | | | | | __bridge_retained/__bridge_transfer when migrating. rdar://11569198 llvm-svn: 157785
* [objcmt] Add test case for r157395.Argyrios Kyrtzidis2012-05-242-2/+4
| | | | llvm-svn: 157404
* [arcmt] Remove an unused -autorelease, without failing with error, for thisArgyrios Kyrtzidis2012-05-236-52/+74
| | | | | | | | | | | idiom that is used commonly in setters: [backingValue autorelease]; backingValue = [newValue retain]; // in general a +1 assign rdar://9914061 llvm-svn: 157347
* [objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.Argyrios Kyrtzidis2012-05-222-2/+8
| | | | | | rdar://11501256 llvm-svn: 157227
* [arcmt] Revert r156999 "Remove the "it is not safe to remove an unused ↵Argyrios Kyrtzidis2012-05-211-1/+2
| | | | | | | | | | 'autorelease' message" ARC migration error". Per feedback from John this is useful to have in general. llvm-svn: 157198
* [arcmt] Remove the "it is not safe to remove an unused 'autorelease' ↵Argyrios Kyrtzidis2012-05-171-2/+1
| | | | | | | | | | | | | | message" ARC migration error. This is more trouble that it is worth; autoreleasing a value without holding on it is a valid use-case, we should not "punish" correct code for the minority of broken/fragile programs that depend on the behavior of -autorelease. rdar://9914061 llvm-svn: 156999
* [objcmt] Accept char arrays for rewriting to @() syntax.Argyrios Kyrtzidis2012-05-162-0/+6
| | | | | | Part of rdar://11438360 llvm-svn: 156880
* [objcmt] Rewrite messages to NSString's stringWithUTF8String:/stringWithCString:Argyrios Kyrtzidis2012-05-152-0/+60
| | | | | | | | | | | to use the @() boxing syntax. It will also rewrite uses of stringWithCString:encoding: where the encoding that is used is NSASCIIStringEncoding or NSUTF8StringEncoding. rdar://11438360 llvm-svn: 156868
* [objcmt] Rewrite [NSNumber numberWith*] messages to the new @() boxing syntax.Argyrios Kyrtzidis2012-05-153-2/+138
| | | | | | | | | | | | | There are some caveats: -If an implicit cast (e.g. int -> float for numberWithFloat:) was required, the message will not get rewritten -If the message was with numberWithInteger:/numberWithUnsignedInteger:, which are very commonly used, be more liberal and allow the boxing syntax if the underlying type has same signedness and will not lose precision. Part of rdar://11438360 llvm-svn: 156844
* [objcmt] When rewriting to subscripting syntax, make sure we putArgyrios Kyrtzidis2012-05-142-0/+4
| | | | | | | | 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-144-0/+36
| | | | | | | | cast to 'id' for any argument that requires it. Part of rdar://11438360. llvm-svn: 156782
* [arcmt] When fixing the "unassigned init call" ARC error, make sureArgyrios Kyrtzidis2012-03-312-2/+6
| | | | | | | | to do a nil check for the result of the call. rdar://10950973 llvm-svn: 153793
* [arcmt] Fix a bug where a property in a class extension, that did not existArgyrios Kyrtzidis2012-03-292-2/+4
| | | | | | | | | in the interface, got its attribute rewritten twice, resulting in 'weakweak' or 'strongstrong'. rdar://11047179 llvm-svn: 153621
* Don't include FixIts with a null replacement range. Fixes ↵Ted Kremenek2012-03-201-1/+8
| | | | | | <rdar://problem/11040133>. llvm-svn: 153122
* [objcmt] Add a triple to test/ARCMT/objcmt-subscripting-literals.mArgyrios Kyrtzidis2012-03-062-2/+2
| | | | llvm-svn: 152151
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-0613-13/+1343
| | | | | | | | | | | 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
* [arcmt]Argyrios Kyrtzidis2012-03-052-0/+40
| | | | | | | | | -Make sure we don't change to '__weak' a __block variable used as output. -Make sure we don't apply __weak twice. Fixes rdar://10520757&10521362 llvm-svn: 152020
* [arcmt] GC migrator: don't try to remove redundant __strong, it doesArgyrios Kyrtzidis2012-02-256-18/+16
| | | | | | | | more harm than good. Fixes rdar://10522805&10521433 llvm-svn: 151424
* Revert r145999. This turned out to be a bad idea. Unfortunately, 'id' is ↵Ted Kremenek2012-02-101-12/+7
| | | | | | | | | used so profusely in many APIs and large codebases that this made the deprecated warning trigger happy to the point of not being useful. llvm-svn: 150223
* Look for declaration of CFBridgingRetain/CFBridgingRetain beforeFariborz Jahanian2012-02-013-9/+18
| | | | | | changing the diagnostic. Also use correct spelling for both. llvm-svn: 149554
* objc-arc: In various diagnostics mention Fariborz Jahanian2012-01-313-9/+9
| | | | | | | | CFBridgingRetain/CFBridgingRelease calls instead of __bridge_retained/__bridge_transfer casts as preferred way of moving cf objects to arc land. // rdar://10207950 llvm-svn: 149449
* arc migrator: twik previous patch to exclude user providedFariborz Jahanian2012-01-311-3/+1
| | | | | | explicit type cast. // rdar://10521744 llvm-svn: 149437
* arc migrator: Do not attempt to migrate to bridge casts which Fariborz Jahanian2012-01-311-0/+43
| | | | | | | cancel out each other. Leave it alone so users can take a look (unmigrated code forces error diagnostic). // rdar://10521744 llvm-svn: 149435
* objc-arc: introduce -no-finalize-removal which in gc mode,Fariborz Jahanian2012-01-262-0/+192
| | | | | | | | leaves "finalize' behind and in arc mode, does not include it. This allows the migrated source to be compiled in both gc and arc mode. // rdar://10532441 llvm-svn: 149079
* arc migrator: Provide infrastructure to add optionsFariborz Jahanian2012-01-251-0/+12
| | | | | | | | | specific to migrator. Use its first option to warn migrating from GC to arc when NSAllocateCollectable/NSReallocateCollectable is used. // rdar://10532541 llvm-svn: 148887
* arg migrator: change all "assign" of object propertiesFariborz Jahanian2012-01-213-8/+30
| | | | | | to "strong" when migrating from GC. // rdar://10532449 llvm-svn: 148607
* rename -ccc-host-triple into -targetSebastian Pop2012-01-201-2/+2
| | | | llvm-svn: 148582
* arc migrator: replace "retain" attribute with "strong"Fariborz Jahanian2012-01-208-19/+19
| | | | | | | which have same semantics in mrr as well as arr. // rdar://10688312 llvm-svn: 148559
* Revert r148138; it's causing test failures.Eli Friedman2012-01-131-2/+2
| | | | llvm-svn: 148141
* rename -ccc-host-triple into -targetSebastian Pop2012-01-131-2/+2
| | | | llvm-svn: 148138
* [arcmt] The migrator tests for the buildbot in ↵Argyrios Kyrtzidis2012-01-1232-32/+32
| | | | | | | | http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/ are messed up, XFAIL does not help. Waiting until DISABLE is supported.. llvm-svn: 148012
* [arcmt] XFAIL on mingw.Argyrios Kyrtzidis2012-01-1032-32/+32
| | | | llvm-svn: 147830
* [arcmt] Disable tests in mingw, no idea why they are failing there.Argyrios Kyrtzidis2012-01-0732-0/+33
| | | | llvm-svn: 147713
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) llvm-svn: 146619
* [arcmt] Un-XFAIL a test.Argyrios Kyrtzidis2011-12-091-7/+38
| | | | llvm-svn: 146210
* Make changes to SDiagsWriter to make it work in combination with the ARC ↵Argyrios Kyrtzidis2011-12-071-0/+48
| | | | | | | | | | | | | migrator: -Allow it to be used with multiple BeginSourceFile/EndSourceFile calls; for this introduce a "finish" callback method in the DiagnosticConsumer. SDiagsWriter finishes up the serialization file inside this method. -Make it independent of any particular DiagnosticsEngine; make it use the SourceManager of the Diagnostic object. -Ignore null source ranges. llvm-svn: 146020
* objc: issue deprecated/unavailable diagnostic whenFariborz Jahanian2011-12-071-0/+1
| | | | | | | methods with these attributes are sent to receivers of 'id' type too. // rdar://10459930 llvm-svn: 145999
* [arcmt] Integrate GC __weak into property attributes even when we don't haveArgyrios Kyrtzidis2011-11-282-0/+12
| | | | | | the implementation. llvm-svn: 145224
* [arcmt] Don't add __weak if there is already a GC __weak and make sure to clearArgyrios Kyrtzidis2011-11-282-2/+10
| | | | | | __weak from a readonly property. llvm-svn: 145210
* [arcmt] Take into account that all properties are strong-by-default now and ↵Argyrios Kyrtzidis2011-11-082-8/+6
| | | | | | fix the test. llvm-svn: 144146
* [arcmt] Now that readonly properties are strong-by-default, do not add ↵Argyrios Kyrtzidis2011-11-083-4/+6
| | | | | | redundant 'strong'. llvm-svn: 144136
* objc-arc: 'readonly' property of retainable objectFariborz Jahanian2011-11-082-4/+6
| | | | | | type is strong by default too. // rdar://10410903 llvm-svn: 144118
* [arcmt] Now that properties are strong by default, avoid adding redundant ↵Argyrios Kyrtzidis2011-11-082-2/+6
| | | | | | | | '(strong)' property attribute. llvm-svn: 144078
* [arcmt] When we already removed a __weak, don't try to change it to ↵Argyrios Kyrtzidis2011-11-082-0/+141
| | | | | | | | __unsafe_unretained later on, or we will end up with a redundant '__unsafe_unretained'. llvm-svn: 144059
OpenPOWER on IntegriCloud