diff options
Diffstat (limited to 'clang/test/ARCMT/checking.m')
| -rw-r--r-- | clang/test/ARCMT/checking.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/ARCMT/checking.m b/clang/test/ARCMT/checking.m index 9d2d15053a0..3ad911e10a8 100644 --- a/clang/test/ARCMT/checking.m +++ b/clang/test/ARCMT/checking.m @@ -101,6 +101,7 @@ void test1(A *a, BOOL b, struct UnsafeS *unsafeS) { 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}} \ + // expected-note {{use __bridge to convert directly (no change in ownership)}} \ // expected-note {{use CFBridgingRelease call to transfer ownership of a +1 'CFStringRef' (aka 'const struct __CFString *') into ARC}} \ str = (NSString *)kUTTypePlainText; str = b ? kUTTypeRTF : kUTTypePlainText; @@ -159,10 +160,10 @@ void * cvt(id arg) (void)(void*)voidp_val; (void)(void**)arg; // expected-error {{disallowed}} cvt((void*)arg); // expected-error 2 {{requires a bridged cast}} \ - expected-note {{use CFBridgingRelease call}} expected-note {{use CFBridgingRetain call}} + // expected-note 2 {{use __bridge to}} expected-note {{use CFBridgingRelease call}} expected-note {{use CFBridgingRetain call}} cvt(0); (void)(__strong id**)(0); - return arg; // expected-error {{requires a bridged cast}} expected-note {{use CFBridgingRetain call}} + return arg; // expected-error {{requires a bridged cast}} expected-note {{use __bridge}} expected-note {{use CFBridgingRetain call}} } |

