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

Francois Pichet pichet2000 at gmail.com
Fri Oct 8 09:31:33 PDT 2010


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);


Please review.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ms_attributes.patch
Type: application/octet-stream
Size: 5468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101008/128cf182/attachment.obj>


More information about the cfe-commits mailing list