[cfe-dev] [clang] declspec(property...) advice

Francois Pichet pichet2000 at gmail.com
Fri Apr 29 08:50:15 PDT 2011


On Wed, Dec 8, 2010 at 12:56 PM, Eric Niebler <eric at boostpro.com> wrote:
> I'm currently working on getting the front-end to eat Microsoft's
> __declspec(property...) extension.
>
> http://msdn.microsoft.com/en-us/library/yhfk0thd%28v=VS.100%29.aspx
>
> I've gotten things to the point where I can parse it and generate a
> PropertyAttr attached to the FieldDecl. The PropertyAttr has two string
> attributes representing the name of the getter and setter member
> functions. I am wondering if this is the best way to represent this in
> the AST. My impression of how the feature is used is that expressions
> are rewritten:
>
>  "a = x.foo"  becomes  "a = x.getFoo()"
>  "x.foo = a"  becomes  "x.setFoo(a)"
>  "x.foo += 1" becomes  "x.setFoo(x.getFoo() + 1)"

Hi Eric,

What is the status of this patch?
I am testing clang against MFC code (yes really!!) and I really need
this extension to move forward.
Are you close to submitting something or do you have a partial patch at least?
Otherwise I am planning to go ahead and implement at least parsing
support for this extension.




More information about the cfe-dev mailing list