diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-07-29 16:05:45 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-07-29 16:05:45 +0000 |
commit | 8f70ddb5576f338d409caa1404cebd40d6a05951 (patch) | |
tree | 4ed61c525e38e600393d1560ccca9e2864adde5c /lib/Sema/SemaExpr.cpp | |
parent | 447234dd459a00a5ed9b7c3e066162cd7a75bf2d (diff) |
When taking the address of a value of Objective-C object type (e.g.,
one because we're referencing a variable of type NSString &), the
resulting type is an ObjCObjectPointerType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index b2f1a356df..6f971b116d 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -6313,6 +6313,8 @@ QualType Sema::CheckAddressOfOperand(Expr *op, SourceLocation OpLoc) { } // If the operand has type "type", the result has type "pointer to type". + if (op->getType()->isObjCObjectType()) + return Context.getObjCObjectPointerType(op->getType()); return Context.getPointerType(op->getType()); } |