Bind the result of a property fetch to a temporary.

llvm-svn: 121452
This commit is contained in:
John McCall 2010-12-10 01:49:45 +00:00
parent 4a5bd5fec4
commit 4f26cd8101
1 changed files with 4 additions and 0 deletions

View File

@ -7035,6 +7035,10 @@ void Sema::ConvertPropertyForRValue(Expr *&E) {
E = ImplicitCastExpr::Create(Context, E->getType(), CK_GetObjCProperty,
E, 0, VK);
ExprResult Result = MaybeBindToTemporary(E);
if (!Result.isInvalid())
E = Result.take();
}
void Sema::ConvertPropertyForLValue(Expr *&LHS, Expr *&RHS, QualType &LHSTy) {