Hi all, I've rewritten the __declspec(property) implementation,using PseudoObject.<div><br></div><div>If you're comfortable with this patch, I'll work on tests, code-style, and post it to cfe-commits.</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Dec 7, 2012 at 2:55 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Dec 6, 2012, at 8:41 PM, "<a href="mailto:endlessroad1991@gmail.com">endlessroad1991@gmail.com</a>" <<a href="mailto:endlessroad1991@gmail.com">endlessroad1991@gmail.com</a>> wrote:<br>
> Yes, if we put it in CodeGen, we still have to do much work which is Sema's responsibility, and that's ugly.<br>
><br>
> I looked into pseudo objects and ObjC property implementation.I see that set is handled in Sema::BuildBinOp(which calls Sema::checkPseudoObjectAssignment), and get is handled in Sema::CheckPlaceHolder, which is called in many places. And we are sure that L-Value property(thus set) won't be rewritten to getter call, because Sema::CheckPlaceHolder will only handle R-Value situations.<br>

><br>
> Are these "deductions" correct? If so, I will reimplement property using pseudo objects.<br>
> Thanks for the info!<br>
<br>
</div>Well, you would actually handle these in the functions that are *called* by those places, which are all in SemaPseudoObject.cpp.  But that's the basic idea.<br>
<span class="HOEnZb"><font color="#888888"><br>
John.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards, Tong Shen (沈彤)<br>
</div>