[cfe-commits] r141966 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Oct 14 11:31:36 PDT 2011
Author: fjahanian
Date: Fri Oct 14 13:31:36 2011
New Revision: 141966
URL: http://llvm.org/viewvc/llvm-project?rev=141966&view=rev
Log:
Make value kind based on the return type of the getter, not
property type, for when getter may be a reference type.
// rdar://10188258 revised.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=141966&r1=141965&r2=141966&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Oct 14 13:31:36 2011
@@ -7205,15 +7205,15 @@
VK = Expr::getValueKindForType(GetterMethod->getResultType());
}
else {
+ // lvalue-ness of an explicit property is determined by
+ // getter type.
Diag(PRE->getLocation(), diag::err_getter_not_found)
<< PRE->getBase()->getType();
}
}
else {
- // lvalue-ness of an explicit property is determined by
- // property type.
- ObjCPropertyDecl *PDecl = PRE->getExplicitProperty();
- VK = Expr::getValueKindForType(PDecl->getType());
+ QualType ResT = PRE->getGetterResultType();
+ VK = Expr::getValueKindForType(ResT);
}
E = ImplicitCastExpr::Create(Context, T, CK_GetObjCProperty,
More information about the cfe-commits
mailing list