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

Richard Smith richard at metafoo.co.uk
Tue Mar 26 17:40:52 PDT 2013


On Sat, Mar 23, 2013 at 4:34 AM, endlessroad1991 at gmail.com <
endlessroad1991 at gmail.com> wrote:

> Hi all,
> Here's an updated version of property patch, based on clang 3.2 release.
> Changes:
> - Add tests in Parser and Sema
> - Fix warnings
> - Fix property reference expr serialization/deserialization bug
> - Fix property reference of base-class property, like SuperClass::V
>
> I have been using this patch on a quite large and complex codebase for
> over a month, including the following situations:
> - normal property definition and get/set
> - property reference in almost everywhere: binary-op operand, array-size,
> function call arguments, var initializer, etc
> - both implicit(this) and explicit property reference
> - property whose type is dependent
> - reference of property of super-class
> - headers are compiled into .pch files, and then used by source files(it
> proves serialization/deserialization works fine)
> For now I haven't found any problems.
>
> I believe it's stable enough.
> So would some clang developer take a final look at this, and try merging
> it into trunk?
>

Please rebase the patch against trunk; clang development moves fast and 3.2
is pretty old now.


> Thank you very much.
>
> On Fri, Mar 22, 2013 at 8:42 PM, Will Wilson <will at indefiant.com> wrote:
>
>> Tong Shen et al,
>>
>> What's the current status of this patch? I ask as I'm encountering quite
>> a few examples of MSVC properties in code right now and it's causing
>> something of a headache to workaround. It would be great to see even basic
>> parsing support for it for now.
>>
>> - Will.
>>
>>
>> On 10 January 2013 15:39, Aaron Ballman <aaron at aaronballman.com> wrote:
>>
>>> I should also note that I'm seeing a couple of warnings in your patch as
>>> well:
>>>
>>> warning C4062: enumerator 'MSProperty' in switch of enum
>>> 'clang::Decl::Kind' is not handled
>>> C:\llvm\llvm\tools\clang\tools\libclang\CIndex.cpp 4545
>>>
>>> warning C4062: enumerator 'MSPropertyRefExprClass' in switch of enum
>>> 'clang::Stmt::StmtClass' is not handled
>>> C:\llvm\llvm\tools\clang\tools\libclang\CXCursor.cpp 486
>>>
>>> ~Aaron
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>
>>
>>
>>
>> --
>> *Indefiant Ltd.*
>>  *
>> *
>> Firsby Lodge, New Main Road, Scamblesby, Louth, Lincs LN11 9XH UK
>> *Tel: +44 20 8123 7663 England Registered No. 07936820 VAT No. **
>> 128556202*
>>
>
>
>
> --
> Best Regards, Tong Shen (沈彤)
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130326/0c8bfde3/attachment.html>


More information about the cfe-commits mailing list