[cfe-commits] r141009 - in /cfe/trunk: lib/Sema/SemaExpr.cpp test/CodeGenObjCXX/property-object-reference.mm

jahanian fjahanian at apple.com
Fri Oct 14 11:34:47 PDT 2011


On Oct 13, 2011, at 5:55 PM, Douglas Gregor wrote:

> 
> On Oct 3, 2011, at 10:58 AM, Fariborz Jahanian wrote:
> 
>> +  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);
> 
> This is actually really interesting. It seems to me that we want to determine the value kind based on the return type of the getter, in case something does something like this:
> 
> @interface A
> @property std::string Property;
> - (const std::string&)Property;
> @end
> 
> I think this is fairly reasonable.

Makes sense (and we were already doing it that way in other situations). In r141966.

- Fariborz

> 
> 	- Doug




More information about the cfe-commits mailing list