diff options
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 1675568a56a..707d577f613 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -7388,7 +7388,13 @@ ExprResult Sema::ConvertPropertyForRValue(Expr *E) { << PRE->getBase()->getType(); } } - + else { + // lvalue-ness of an explicit property is determined by + // property type. + ObjCPropertyDecl *PDecl = PRE->getExplicitProperty(); + VK = Expr::getValueKindForType(PDecl->getType()); + } + E = ImplicitCastExpr::Create(Context, T, CK_GetObjCProperty, E, 0, VK); |

