diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2017-09-28 01:31:17 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2017-09-28 01:31:17 +0000 |
commit | 36c5bf71e4988db2b6d67160293e0bc029bb5737 (patch) | |
tree | 426ec230c018cfacbc56a96f181964c17326680f /test/CodeGenObjC | |
parent | 99c674688d2066100d30fa711e8140301f14c002 (diff) |
Look through parentheses.
This fixes a bug where clang would emit instructions to reclaim a value
that's going to be __bridge-casted to CF.
rdar://problem/34687542
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC')
-rw-r--r-- | test/CodeGenObjC/arc-bridged-cast.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGenObjC/arc-bridged-cast.m b/test/CodeGenObjC/arc-bridged-cast.m index 97a45c5a2f..93f5d7ccaa 100644 --- a/test/CodeGenObjC/arc-bridged-cast.m +++ b/test/CodeGenObjC/arc-bridged-cast.m @@ -97,3 +97,10 @@ 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()); + return r; +} |