[cfe-dev] improve attributes handling in clang

Douglas Gregor dgregor at apple.com
Wed Dec 1 11:38:08 PST 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101201/9d05eb10/attachment.html>


More information about the cfe-dev mailing list