summaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/arc-bridged-cast.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/arc-bridged-cast.m')
-rw-r--r--test/CodeGenObjC/arc-bridged-cast.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenObjC/arc-bridged-cast.m b/test/CodeGenObjC/arc-bridged-cast.m
index 97a45c5a2f10..42795d5d8009 100644
--- a/test/CodeGenObjC/arc-bridged-cast.m
+++ b/test/CodeGenObjC/arc-bridged-cast.m
@@ -97,3 +97,11 @@ void bridge_of_cf(int *i) {
// CHECK-NEXT: ret void
}
+// CHECK-LABEL: define %struct.__CFString* @bridge_of_paren_expr()
+CFStringRef bridge_of_paren_expr() {
+ // CHECK-NOT: call i8* @objc_retainAutoreleasedReturnValue(
+ // CHECK-NOT: call void @objc_release(
+ CFStringRef r = (__bridge CFStringRef)(CreateNSString());
+ r = (__bridge CFStringRef)((NSString *)(CreateNSString()));
+ return r;
+}