aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/arc-unavailable-for-weakref.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/arc-unavailable-for-weakref.mm')
-rw-r--r--test/SemaObjCXX/arc-unavailable-for-weakref.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SemaObjCXX/arc-unavailable-for-weakref.mm b/test/SemaObjCXX/arc-unavailable-for-weakref.mm
index 74fdd54d48..2347061cfd 100644
--- a/test/SemaObjCXX/arc-unavailable-for-weakref.mm
+++ b/test/SemaObjCXX/arc-unavailable-for-weakref.mm
@@ -16,7 +16,7 @@ int main() {
ns1 = (__weak sub *)obj; // expected-error {{assignment of a weak-unavailable object to a __weak object}} \
// expected-error {{class is incompatible with __weak references}} \
- // expected-error {{casting expression of type 'id' to type 'sub *__weak' with qualified lifetimewill not change object lifetime}}
+ // expected-error {{explicit ownership qualifier on cast result would have no effect}}
}
// rdar://9732636
@@ -32,7 +32,7 @@ NOWEAK * Test1() {
__weak id weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
return (__weak id)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK *' to a __weak object of type '__weak id'}} \
- // expected-error {{casting expression of type 'NOWEAK *' to type '__weak id' with qualified lifetimewill not change object lifetime}}
+ // expected-error {{explicit ownership qualifier on cast result would have no effect}}
}
@protocol P @end
@@ -45,6 +45,6 @@ NOWEAK<P, P1> * Test2() {
__weak id<P> weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
return (__weak id<P, P1>)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK<P,P1> *' to a __weak object of type '__weak id<P,P1>'}} \
- // expected-error {{casting expression of type 'NOWEAK<P,P1> *' to type '__weak id<P,P1>' with qualified lifetimewill not change object lifetime}}
+ // expected-error {{explicit ownership qualifier on cast result would have no effect}}
}