diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-11-13 22:27:05 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-11-13 22:27:05 +0000 |
commit | 5a9e57002331c7c566e38ee750d50cac1babc18f (patch) | |
tree | dd655bde4b9abfc2aeefeff31739d599cf2c98f3 /test/ARCMT | |
parent | 773d19cce43a660639a26fca94ca387c2faf4d39 (diff) | |
download | clang-5a9e57002331c7c566e38ee750d50cac1babc18f.tar.gz |
Objective-C. Fixes a regression caused by implementation
of new warning for deprecated method call for receiver
of type 'id'. This addresses rdar://18960378 where
unintended warnings being issued.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ARCMT')
-rw-r--r-- | test/ARCMT/checking.m | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/test/ARCMT/checking.m b/test/ARCMT/checking.m index 76c4443076..6a7cf76c38 100644 --- a/test/ARCMT/checking.m +++ b/test/ARCMT/checking.m @@ -14,9 +14,9 @@ typedef int BOOL; typedef unsigned NSUInteger; @protocol NSObject -- (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE; // expected-note {{'retain' has been explicitly marked unavailable here}} +- (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE; - (NSUInteger)retainCount NS_AUTOMATED_REFCOUNT_UNAVAILABLE; -- (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE; // expected-note 4 {{'release' has been explicitly marked unavailable here}} +- (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE; - (id)autorelease NS_AUTOMATED_REFCOUNT_UNAVAILABLE; @end @@ -74,20 +74,16 @@ id global_foo; void test1(A *a, BOOL b, struct UnsafeS *unsafeS) { [[a delegate] release]; // expected-error {{it is not safe to remove 'retain' message on the result of a 'delegate' message; the object that was passed to 'setDelegate:' may not be properly retained}} \ - // expected-error {{'release' is unavailable: not available in automatic reference counting mode}} \ // expected-error {{ARC forbids explicit message send}} [a.delegate release]; // expected-error {{it is not safe to remove 'retain' message on the result of a 'delegate' message; the object that was passed to 'setDelegate:' may not be properly retained}} \ - // expected-error {{'release' is unavailable: not available in automatic reference counting mode}} \ // expected-error {{ARC forbids explicit message send}} [unsafeS->unsafeObj retain]; // expected-error {{it is not safe to remove 'retain' message on an __unsafe_unretained type}} \ // expected-error {{ARC forbids explicit message send}} \ // expected-error {{'retain' is unavailable}} id foo = [unsafeS->unsafeObj retain]; // no warning. [global_foo retain]; // expected-error {{it is not safe to remove 'retain' message on a global variable}} \ - // expected-error {{'retain' is unavailable: not available in automatic reference counting mode}} \ // expected-error {{ARC forbids explicit message send}} [global_foo release]; // expected-error {{it is not safe to remove 'release' message on a global variable}} \ - // expected-error {{'release' is unavailable: not available in automatic reference counting mode}} \ // expected-error {{ARC forbids explicit message send}} [a dealloc]; [a retain]; @@ -308,8 +304,7 @@ void rdar9491791(int p) { // rdar://9504750 void rdar9504750(id p) { - RELEASE_MACRO(p); // expected-error {{ARC forbids explicit message send of 'release'}} \ - // expected-error {{'release' is unavailable: not available in automatic reference counting mode}} + RELEASE_MACRO(p); // expected-error {{ARC forbids explicit message send of 'release'}} } // rdar://8939557 |