diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-07-27 21:34:23 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-07-27 21:34:23 +0000 |
| commit | 84c97cafd063882b956ecc4b6743cbe185ef2ddc (patch) | |
| tree | 0c08814374b3f829f96561531895e86b4912fe6d /clang/test/ARCMT/checking.m | |
| parent | 249716e8aef5ac234a9a29f3ed3d0a931884192e (diff) | |
| download | bcm5719-llvm-84c97cafd063882b956ecc4b6743cbe185ef2ddc.tar.gz bcm5719-llvm-84c97cafd063882b956ecc4b6743cbe185ef2ddc.zip | |
revert r160839 for now.
llvm-svn: 160895
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}} } |

