diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-01 23:01:46 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-01 23:01:46 +0000 |
commit | 28445f0b62f6aed851ff87ce64d9b19200d3211f (patch) | |
tree | d94f8d3fe0d0a3b41a1473e3d54be378efc3bf82 /test/SemaObjCXX | |
parent | dca5226598097add5d86d57b227aa31df27f0ba4 (diff) | |
download | clang-28445f0b62f6aed851ff87ce64d9b19200d3211f.tar.gz |
-Fix mistake in ASTContext::getInnerObjCOwnership noticed by Doug
-Remove unnecessary 'return'.
-Remove unnecessary 'if' check (llvm_unreachable make sure attrStr will be non-null)
-Add a test of transferring ownership to a reference cast type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjCXX')
-rw-r--r-- | test/SemaObjCXX/arc-type-conversion.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/SemaObjCXX/arc-type-conversion.mm b/test/SemaObjCXX/arc-type-conversion.mm index 5e7d5cc859..baf4b82082 100644 --- a/test/SemaObjCXX/arc-type-conversion.mm +++ b/test/SemaObjCXX/arc-type-conversion.mm @@ -203,6 +203,7 @@ typedef void (^Block_autoreleasing)() __autoreleasing; void ownership_transfer_in_cast(void *vp, Block *pblk) { __strong NSString **sip2 = static_cast<NSString **>(static_cast<__strong id *>(vp)); + __strong NSString **&si2pref = static_cast<NSString **&>(sip2); __weak NSString **wip2 = static_cast<NSString **>(static_cast<__weak id *>(vp)); __autoreleasing id *aip2 = static_cast<id *>(static_cast<__autoreleasing id *>(vp)); __unsafe_unretained id *uip2 = static_cast<id *>(static_cast<__unsafe_unretained id *>(vp)); |