diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-17 18:16:05 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-17 18:16:05 +0000 |
commit | b6a1b10a8d9e0405b7a0d12273623c7f4d23f7d9 (patch) | |
tree | 9cbdb3e8fbe67f381059824408cce43e9ba964fa /test/ARCMT | |
parent | eecb22b916b6bd19655515d59a01ebd0dad37ab6 (diff) |
[arcmt] Remove the "it is not safe to remove an unused 'autorelease' 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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ARCMT')
-rw-r--r-- | test/ARCMT/checking.m | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/ARCMT/checking.m b/test/ARCMT/checking.m index cf7161187f..73eba9fc7b 100644 --- a/test/ARCMT/checking.m +++ b/test/ARCMT/checking.m @@ -89,8 +89,7 @@ void test1(A *a, BOOL b, struct UnsafeS *unsafeS) { [a retain]; [a retainCount]; // expected-error {{ARC forbids explicit message send of 'retainCount'}} [a release]; - [a autorelease]; // expected-error {{it is not safe to remove an unused 'autorelease' message; its receiver may be destroyed immediately}} \ - // expected-error {{ARC forbids explicit message send}} + [a autorelease]; CFStringRef cfstr; NSString *str = (NSString *)cfstr; // expected-error {{cast of C pointer type 'CFStringRef' (aka 'const struct __CFString *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \ |