[cfe-commits] [PATCH][MS][Review request] - Microsoft Attributes parsing support

Francois Pichet pichet2000 at gmail.com
Sat Oct 9 01:56:54 PDT 2010


On Sat, Oct 9, 2010 at 4:39 AM, Sebastian Redl
<sebastian.redl at getdesigned.at> wrote:
>
> On 08.10.2010, at 18:31, Francois Pichet wrote:
>
>> First: Microsoft attributes are not C+0X attributes.
>>
>> This patch is very important to parse MSVC headers
>> Up to now i had used the flag -D_USE_ATTRIBUTES_FOR_SAL to disable
>> attributes while parsing MSVC headers with clang.
>> Now I removed that option and this is the patch needed to remove 1000+ errors.
>>
>> Microsoft attributes exist in C and C++.
>> MS attributes are used for COM programming and also to give
>> information to the MSVC code analyzer.
>> This patch just add parsing support for attributes, the attributes are
>> basically skipped. That's sufficient for now I think. We gonna walk
>> before we run.
>>
>> example :
>>
>> [returnvalue:SA_Post(MustCheck=SA_Yes)] int __cdecl
>> _isctype([SA_Pre(Null=SA_No)]
>> [SA_Pre(Deref=1,Valid=SA_Yes,Access=SA_Read)] int _C,
>> [SA_Pre(Null=SA_No)] [SA_Pre(Deref=1,Valid=SA_Yes,Access=SA_Read)] int
>> _Type);
>
> What happens if someone enables Microsoft extensions in Objective-C mode? Those attributes could be easily confused with a message send.
>

I am not very familiar with Objective C but who wants to enable
Microsoft extensions in Objective C mode?
To port a Windows game to iPhone? Is it something we want to support?



More information about the cfe-commits mailing list