[cfe-dev] [RFC] Preliminary patch to support MSVC __declspec(property)

endlessroad1991 at gmail.com endlessroad1991 at gmail.com
Sat Dec 22 07:11:00 PST 2012


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.
And I still think that subscriptable property is kind of messy...
So I only implement non-subscriptable property.

Brief:
- Add a MSPropertyDecl, parallel to FieldDecl. Now property is separated
from Field.
- Add a MSPropertyRefExpr. It seems to be necessary, because we can't just
create a PseudoObjectExpr.

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

Patch, and a "difficult" testcase attached.
I'm quite happy with this version, because it's much simpler and cleaner.
John - Thank you very much, for the MSPropertyDecl and PseudoObjectExpr
tips. They are really crucial to this patch.

-- 
Best Regards, Tong Shen (沈彤)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121222/ff0146ac/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.patch
Type: application/octet-stream
Size: 30708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121222/ff0146ac/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.cpp
Type: text/x-c++src
Size: 645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121222/ff0146ac/attachment.cpp>


More information about the cfe-dev mailing list