summaryrefslogtreecommitdiffstats
path: root/clang/test/ARCMT/api.m
Commit message (Collapse)AuthorAgeFilesLines
* Remove all DISABLE lines from testsAlp Toker2013-12-081-1/+0
| | | | | | | | There's no evidence that a 'DISABLE' directive ever existed. Let's see if anything breaks.. llvm-svn: 196733
* [arcmt] The migrator tests for the buildbot in ↵Argyrios Kyrtzidis2012-01-121-1/+1
| | | | | | | | 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-101-1/+1
| | | | llvm-svn: 147830
* [arcmt] Disable tests in mingw, no idea why they are failing there.Argyrios Kyrtzidis2012-01-071-0/+1
| | | | llvm-svn: 147713
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-021-2/+2
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* [arcmt] More automatic transformations and safety improvements; rdar://9615812 :Argyrios Kyrtzidis2011-07-271-0/+9
- Replace calling -zone with 'nil'. -zone is obsolete in ARC. - Allow removing retain/release on a static global var. - Fix assertion hit when scanning for name references outside a NSAutoreleasePool scope. - Automatically add bridged casts for results of objc method calls and when calling CFRetain, for example: NSString *s; CFStringRef ref = [s string]; -> CFStringRef ref = (__bridge CFStringRef)([s string]); ref = s.string; -> ref = (__bridge CFStringRef)(s.string); ref = [NSString new]; -> ref = (__bridge_retained CFStringRef)([NSString new]); ref = [s newString]; -> ref = (__bridge_retained CFStringRef)([s newString]); ref = [[NSString alloc] init]; -> ref = (__bridge_retained CFStringRef)([[NSString alloc] init]); ref = [[s string] retain]; -> ref = (__bridge_retained CFStringRef)([s string]); ref = CFRetain(s); -> ref = (__bridge_retained CFTypeRef)(s); ref = [s retain]; -> ref = (__bridge_retained CFStringRef)(s); - Emit migrator error when trying to cast to CF type the result of autorelease/release: for CFStringRef f3() { return (CFStringRef)[[[NSString alloc] init] autorelease]; } emits: t.m:12:10: error: [rewriter] it is not safe to cast to 'CFStringRef' the result of 'autorelease' message; a __bridge cast may result in a pointer to a destroyed object and a __bridge_retained may leak the object return (CFStringRef)[[[NSString alloc] init] autorelease]; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ t.m:12:3: note: [rewriter] remove the cast and change return type of function to 'NSString *' to have the object automatically autoreleased return (CFStringRef)[[[NSString alloc] init] autorelease]; ^ - Before changing attributes to weak/unsafe_unretained, check if the backing ivar is set to a +1 object, in which case use 'strong' instead. llvm-svn: 136208
OpenPOWER on IntegriCloud