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/nonobjc-to-objc-cast-2.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/nonobjc-to-objc-cast-2.m')
-rw-r--r-- | clang/test/ARCMT/nonobjc-to-objc-cast-2.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/ARCMT/nonobjc-to-objc-cast-2.m b/clang/test/ARCMT/nonobjc-to-objc-cast-2.m index b709afd234b..80d694e5868 100644 --- a/clang/test/ARCMT/nonobjc-to-objc-cast-2.m +++ b/clang/test/ARCMT/nonobjc-to-objc-cast-2.m @@ -29,6 +29,7 @@ struct StrS { } -(id)newString { return sref; // expected-error {{implicit conversion of C pointer type 'CFStringRef' (aka 'const struct __CFString *') to Objective-C pointer type 'id' 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}} } @end @@ -36,14 +37,16 @@ struct StrS { void f(BOOL b) { 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}} - void *vp = str; // expected-error {{requires a bridged cast}} expected-note {{use CFBridgingRetain call}} + void *vp = str; // expected-error {{requires a bridged cast}} expected-note {{use CFBridgingRetain call}} expected-note {{use __bridge}} } void f2(NSString *s) { CFStringRef ref; ref = [(CFStringRef)[s string] retain]; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast}} \ // expected-error {{bad receiver type 'CFStringRef' (aka 'const struct __CFString *')}} \ + // expected-note{{use __bridge to convert directly (no change in ownership)}} \ // expected-note{{use CFBridgingRetain call to make an ARC object available as a +1 'CFStringRef' (aka 'const struct __CFString *')}} } |