aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/arc.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/arc.m')
-rw-r--r--test/SemaObjC/arc.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m
index 37949429d0..bd30715a6b 100644
--- a/test/SemaObjC/arc.m
+++ b/test/SemaObjC/arc.m
@@ -264,8 +264,8 @@ void test11(id op, void *vp) {
b = (vp == nil);
b = (nil == vp);
- b = (vp == op); // expected-error {{implicit conversion of Objective-C pointer type 'id' to C pointer type 'void *' requires a bridged cast}} expected-note {{use CFBridgingRetain call}}
- b = (op == vp); // expected-error {{implicit conversion of C pointer type 'void *' to Objective-C pointer type 'id' requires a bridged cast}} expected-note {{use CFBridgingRelease call}}
+ b = (vp == op); // expected-error {{implicit conversion of Objective-C pointer type 'id' to C pointer type 'void *' requires a bridged cast}} expected-note {{use __bridge}} expected-note {{use CFBridgingRetain call}}
+ b = (op == vp); // expected-error {{implicit conversion of C pointer type 'void *' to Objective-C pointer type 'id' requires a bridged cast}} expected-note {{use __bridge}} expected-note {{use CFBridgingRelease call}}
}
void test12(id collection) {
@@ -404,8 +404,10 @@ struct Test19 *const test19b = 0;
void test19(void) {
id x;
x = (id) test19a; // expected-error {{bridged cast}} \
+ // expected-note{{use __bridge to convert directly (no change in ownership)}} \
// expected-note{{use CFBridgingRelease call to transfer ownership of a +1 'struct Test19 *' into ARC}}
x = (id) test19b; // expected-error {{bridged cast}} \
+ // expected-note{{use __bridge to convert directly (no change in ownership)}} \
// expected-note{{use CFBridgingRelease call to transfer ownership of a +1 'struct Test19 *' into ARC}}
}