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

Eric Niebler eric.niebler at gmail.com
Sat Apr 30 23:19:42 PDT 2011


(Apologies for the delay. We've been having problems with the
boostpro.com domain. Not only are our sites offline, but we're not
getting our email either.)

On 4/29/2011 10:50 PM, Francois Pichet wrote:
> On Wed, Dec 8, 2010 at 12:56 PM, Eric Niebler <eric-xT6NqnoQrPdWk0Htik3J/w at public.gmane.org> 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.

I've done this work for a client. I'll check with them and see what
their intentions are regarding the __declspec(property(...)) work.

I hope to have a more conclusive answer for you soon.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com




More information about the cfe-dev mailing list