diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-06-21 19:42:38 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-06-21 19:42:38 +0000 |
commit | c8505ad9182c3ddcfda42bee250b2c32dd1f3219 (patch) | |
tree | 947ab37798ec0a0d260d46c9543a9fd695ebacad /test/CodeGenObjC | |
parent | e26bdb91b7e3912ffe895b78a446db94471a59dd (diff) | |
download | clang-c8505ad9182c3ddcfda42bee250b2c32dd1f3219.tar.gz |
objc-arc: Add support for unbridged cast of
__builtin___CFStringMakeConstantString and CF typed function calls
with explicit cf_returns_retained/cf_returns_not_retained attributes.
// rdar://9544832
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC')
-rw-r--r-- | test/CodeGenObjC/arc-unbridged-cast.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenObjC/arc-unbridged-cast.m b/test/CodeGenObjC/arc-unbridged-cast.m index 5c560e94ab..0f3db09f1f 100644 --- a/test/CodeGenObjC/arc-unbridged-cast.m +++ b/test/CodeGenObjC/arc-unbridged-cast.m @@ -24,4 +24,14 @@ typedef const struct __CFString * CFStringRef; - (void) setP : (CFStringRef)arg {} @end +// rdar://9544832 +CFStringRef SomeOtherFunc() __attribute__((cf_returns_retained)); +id MMM() +{ + id obj = (id)((CFStringRef) __builtin___CFStringMakeConstantString ("" "Some CF String" "")); + if (obj) + return (id) SomeOtherFunc(); + return 0; +} + // CHECK-NOT: call i8* @objc_retainAutoreleasedReturnValue |