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 | 0bdcb8a239baf721a0763f1f01ed3a41cb5b6061 (patch) | |
| tree | 38ecae4785998f11cf61ab94bf81bd9d9a63768e /clang/lib/Sema | |
| parent | 4a338e3dc4f6afe89828d9efc05de0a41511d700 (diff) | |
| download | bcm5719-llvm-0bdcb8a239baf721a0763f1f01ed3a41cb5b6061.tar.gz bcm5719-llvm-0bdcb8a239baf721a0763f1f01ed3a41cb5b6061.zip | |
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.
llvm-svn: 109753
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index b2f1a356dfb..6f971b116d6 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/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());  } | 

