[cfe-dev] improve attributes handling in clang

Sean Hunt rideau3 at gmail.com
Wed Dec 1 23:36:55 PST 2010


On 10-12-01 02:38 PM, Douglas Gregor wrote:
>
> On Nov 22, 2010, at 11:24 PM, Michael Han wrote:
>
>> Hi Doug,
>> I have a question on the plan of improving attribute handling in
>> clang. I am aware that the attribute handling has been improved a lot
>> with Sean’s work by using tblgen to generate boilerplate code such
>> that getting attributes from source to AST is almost fully automated.
>> My question is, is there any plan and / or work to finish, in order to
>> further improve the attribute handling in clang? For example, I
>> noticed getting attributes from source to Sema still requires manually
>> modifying the AttributeList in Sema (although the modification is
>> quite trivial), which might be another place that can be automated
>> using tblgen.
>
> I'd love to see further improvements to attribute handling along the
> lines of what was in Sean's GSoC proposal, but I personally don't plan
> to work on this. Sean, are you planning to continue working on attributes?
>
>> The motivation is we at Autodesk are developing a static code analyzer
>> that checks function call graph through annotated GNU-style attributes
>> acting as metadata associated with the function types and we are
>> interested in improving attributes handling in clang to make it even
>> more easier for user to add implementation defined attributes. Any
>> suggestions and guidance on potential improvements are appreciated.
>
> The major improvements I'd still like to see are to automatically
> generate the parser for attributes (based on the .td file) and to do
> basic semantic checking + adding attributes to AST nodes (also based on
> the .td file).
>
> - Doug

Yes, I am absolutely intending to finish what was done. Classes end next 
week, and then I should have much more free time to rewrite the work I'd 
done to be compatible with the new Sema/Parser divide.

Sean



More information about the cfe-dev mailing list