| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 143980
|
|
|
|
|
|
|
|
|
| |
-Move __strong/__weak added to a property type to the property attribute,
e.g. "@property (assign) __weak Foo *prop;" --> "@property (weak) Foo *prop;"
-Remove (assign) in a property so that it becomes strong-by-default in ARC.
llvm-svn: 143979
|
|
|
|
|
|
| |
to objects of classes that don't support ARC weak
llvm-svn: 143976
|
|
|
|
| |
llvm-svn: 143887
|
|
|
|
| |
llvm-svn: 143886
|
|
|
|
|
|
| |
GC managed non-objc object memory.
llvm-svn: 143747
|
|
|
|
| |
llvm-svn: 143701
|
|
|
|
|
|
| |
object that it receives in ARC.
llvm-svn: 143700
|
|
|
|
|
|
| |
This allows the migrator to visit and fix them.
llvm-svn: 143699
|
|
|
|
| |
llvm-svn: 143698
|
|
|
|
|
|
| |
<rdar://problem/10245086>.
llvm-svn: 142571
|
|
|
|
| |
llvm-svn: 142407
|
|
|
|
|
|
|
|
| |
if possible,
instead of changing it to 'strong'. rdar://9984862.
llvm-svn: 142304
|
|
|
|
|
|
|
| |
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.
llvm-svn: 142219
|
|
|
|
| |
llvm-svn: 141462
|
|
|
|
| |
llvm-svn: 141434
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
annotated with cf_consumed attribute.
llvm-svn: 139709
|
|
|
|
| |
llvm-svn: 139262
|
|
|
|
|
|
| |
mingw and msvc.
llvm-svn: 139223
|
|
|
|
|
|
| |
of leftovers.
llvm-svn: 138971
|
|
|
|
|
|
|
|
| |
Objective-C method buffering(rdar://10056942)
Turned out the same issue existed for C++ inline methods.
llvm-svn: 138960
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and does the Sema on their body after the entire
class/category @implementation is seen. This change allows messaging
of forward private methods, as well as, access to
synthesized ivars of properties with foward synthesize
declarations; among others. In effect, this patch removes
several restrictions placed on objective-c due to in-place
semantics processing of methods.
This is part of // rdar://8843851.
llvm-svn: 138865
|
|
|
|
| |
llvm-svn: 138696
|
|
|
|
| |
llvm-svn: 138674
|
|
|
|
|
|
|
|
| |
into account
that assigning result of -retain means it should be strong. rdar://9931757.
llvm-svn: 137252
|
|
|
|
| |
llvm-svn: 136658
|
|
|
|
| |
llvm-svn: 136209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
| |
C function) implementation
will be rejected with a compilation error in ARC mode, and a compiler warning otherwise.
This may cause breakage in non-arc (and arc) tests which don't expect warning/error. Feel free
to fix the tests, or reverse the patch, if I am unavailable. // rdar://9818354 - WIP
llvm-svn: 135740
|
|
|
|
|
|
|
|
|
|
|
| |
pre-migration ARC errors.
-arcmt-migrate-emit-errors : Emits the pre-migration ARC errors but it doesn't affect anything else
-arcmt-migrate-report-output : Writes out the pre-migration ARC errors to the provided plist file
rdar://9791454
llvm-svn: 135491
|
|
|
|
|
|
|
|
|
| |
add __attribute__((objc_precise_lifetime)) to make sure that the object
(and its data) will not get released before the var goes out-of-scope.
rdar://9206226
llvm-svn: 135382
|
|
|
|
|
|
| |
with __unsafe_unretained parameters. Emit error for strong/weak ones. rdar://9206226
llvm-svn: 135381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
release];" since it's very likely
that, after migration, the object that was passed to 'setDelegate:' will not be properly retained, e.g:
-whatever {
id x = [[MyDoHicky alloc] init];
[someivar setDelegate: x]; // x won't get retained in ARC.
}
-dealloc {
[[someivar delegate] release]; // give migration error here.
}
rdar://8858009
llvm-svn: 135327
|
|
|
|
| |
llvm-svn: 135309
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
id x = ...
@try {
...
} @finally {
[x release];
}
Migrator will drop the release. It's better to change it to "x = 0" in a @finally to avoid leak when exception is thrown.
rdar://9398256
llvm-svn: 135301
|
|
|
|
|
|
| |
errors. rdar://9402555.
llvm-svn: 135213
|
|
|
|
|
|
|
|
| |
used.
Keep the error if the result is unused. rdar://9552694.
llvm-svn: 135209
|
|
|
|
|
|
|
|
|
|
|
| |
An unused autorelease is badness. If we remove it the receiver
will likely die immediately while previously it was kept alive
by the autorelease pool. This is bad practice in general, so leave it
and emit an error to force the user to restructure his code.
rdar://9599884
llvm-svn: 135193
|
|
|
|
|
|
| |
command-line flags. rdar://9567824
llvm-svn: 135115
|
|
|
|
|
|
| |
@synthesizing it.
llvm-svn: 135067
|
|
|
|
|
|
|
|
| |
'retain' -> 'strong', and add
'weak or unsafe_unretained' when 'assign' is missing. rdar://9496219&9602589.
llvm-svn: 135065
|
|
|
|
| |
llvm-svn: 135003
|
|
|
|
|
|
|
|
|
|
| |
with objc_arc_weak_reference_unavailable
or is in a list of classes not supporting 'weak'.
rdar://9489367.
llvm-svn: 135002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block pointers) that don't have any qualification to be POD types. We
were previously considering them to be non-POD types, because this was
convenient in C++ for is_pod-like traits. However, we now end up
inferring lifetime in such cases (template arguments infer __strong),
so it is not necessary.
Moreover, we want rvalues of object type (which have their lifetime
stripped) to be PODs to allow, e.g., va_arg(arglist, id) to function
properly. Fixes <rdar://problem/9758798>.
llvm-svn: 134993
|
|
|
|
| |
llvm-svn: 134899
|
|
|
|
|
|
|
|
| |
and is not that useful
in the first place. http://llvm.org/PR10312.
llvm-svn: 134845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a new mode of migration, where we avoid modifying the original files but
we emit temporary files instead.
<path> will be used to keep migration process metadata. Currently the temporary files
that are produced are put in the system's temp directory but we can put them
in the <path> if is necessary.
Also introduce new ARC migration functions in libclang whose only purpose,
currently, is to accept <path> and provide pairs of original file/transformed file
to map from the originals to the files after transformations are applied.
Finally introduce the c-arcmt-test utility that exercises the new libclang functions,
update arcmt-test, and add tests for the whole process.
rdar://9735086.
llvm-svn: 134844
|
|
|
|
|
|
|
|
|
|
|
|
| |
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.
The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.
llvm-svn: 134453
|
|
|
|
|
|
|
|
|
|
|
|
| |
ownership, if the
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:
id x;
(NSString**)&x; // Casting as (__strong NSString**).
llvm-svn: 134275
|