aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-07-01 23:01:46 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-07-01 23:01:46 +0000
commit28445f0b62f6aed851ff87ce64d9b19200d3211f (patch)
treed94f8d3fe0d0a3b41a1473e3d54be378efc3bf82 /lib/AST/ASTContext.cpp
parentdca5226598097add5d86d57b227aa31df27f0ba4 (diff)
-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 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index aca011f9df..53fb7129fd 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -3523,7 +3523,7 @@ Qualifiers::ObjCLifetime ASTContext::getInnerObjCOwnership(QualType T) const {
else if (const PointerType *PT = T->getAs<PointerType>())
T = PT->getPointeeType();
else if (const ReferenceType *RT = T->getAs<ReferenceType>())
- RT->getPointeeType();
+ T = RT->getPointeeType();
else
break;
}