<div dir="ltr"><div style><br></div><div class="gmail_extra"><div class="gmail_quote">On Sat, Dec 22, 2012 at 10:11 AM, <a href="mailto:endlessroad1991@gmail.com">endlessroad1991@gmail.com</a> <span dir="ltr"><<a href="mailto:endlessroad1991@gmail.com" target="_blank">endlessroad1991@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Some guy from PathScale told me that AMP headers doesn't contain subscriptable property. And I looked at ATL headers, neither do they. So for these purposed, subscriptable property is not necessary.<div>
And I still think that subscriptable property is kind of messy...</div>
<div>So I only implement non-subscriptable property.</div><div><br></div><div>Brief:</div><div>- Add a MSPropertyDecl, parallel to FieldDecl. Now property is separated from Field.</div><div>- Add a MSPropertyRefExpr. It seems to be necessary, because we can't just create a PseudoObjectExpr.</div>

<div><br></div><div>Current status:</div><div>- Non-subscriptable property only.</div><div>- Property can be inherited.</div><div>- Get, Set, =, +=/-=/..., ++/-- works correctly.</div><div>- Property type can be incomplete type, as function return type.</div>

<div><br></div><div>Patch, and a "difficult" testcase attached.</div><div>I'm quite happy with this version, because it's much simpler and cleaner.</div><div>John - Thank you very much, for the MSPropertyDecl and PseudoObjectExpr tips. They are really crucial to this patch.</div>
<div class=""><div class="h5">
<div><div><br></div>-- <br>Best Regards, Tong Shen (沈彤)
</div>
</div></div><br></blockquote><div><br></div>Just one comment:<div><div><br></div><div>+  NamedDecl *NewFD;</div><div>+  AttributeList *MSPropertyAttr = 0;</div><div>+  for (auto it = D.getDeclSpec().getAttributes().getList();</div>
</div><div><br></div><div>Please remove the auto.</div><div>I don't think C++11 features are allowed in the clang code base yet.</div><div> </div></div></div></div>