diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2011-06-21 17:38:29 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-06-21 17:38:29 +0000 |
| commit | 7887637c8227be27a4f1fc2a745ec992a1f24341 (patch) | |
| tree | 43669b63864c35c232d4434aa109dc10ed48546f /clang/test | |
| parent | 646dd0f4d18e50c2d1abc94e24232861be1805aa (diff) | |
| download | bcm5719-llvm-7887637c8227be27a4f1fc2a745ec992a1f24341.tar.gz bcm5719-llvm-7887637c8227be27a4f1fc2a745ec992a1f24341.zip | |
objc-arc: CodeGen part of unbridged cast of CF types.
// rdar://9474349
llvm-svn: 133525
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenObjC/arc-unbridged-cast.m | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/arc-unbridged-cast.m b/clang/test/CodeGenObjC/arc-unbridged-cast.m new file mode 100644 index 00000000000..5c560e94ab5 --- /dev/null +++ b/clang/test/CodeGenObjC/arc-unbridged-cast.m @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -emit-llvm -fobjc-nonfragile-abi -fobjc-arc -o - %s | FileCheck %s +// rdar://9744349 + +typedef const struct __CFString * CFStringRef; + +@interface I +@property CFStringRef P; +- (CFStringRef) CFMeth __attribute__((cf_returns_retained)); +- (CFStringRef) newSomething; +- (CFStringRef) P __attribute__((cf_returns_retained)); +@end + +@implementation I +@synthesize P; +- (id) Meth { + I* p1 = (id)[p1 P]; + id p2 = (id)[p1 CFMeth]; + id p3 = (id)[p1 newSomething]; + return (id) p1.P; +} +- (CFStringRef) CFMeth { return 0; } +- (CFStringRef) newSomething { return 0; } +- (CFStringRef) P { return 0; } +- (void) setP : (CFStringRef)arg {} +@end + +// CHECK-NOT: call i8* @objc_retainAutoreleasedReturnValue |

