[cfe-dev] C++0x attributes

Sean Hunt rideau3 at gmail.com
Mon Apr 12 06:17:43 PDT 2010

On 04/12/2010 06:16 AM, Olaf Krzikalla wrote:
> Hi @all,
> maybe the question is a little bit early given that current C++ support
> is still incomplete, but anyway here we go:
> are there any ongoing or planned efforts to implement attributes
> (syntax: [[attribute]], ยง7.6 in current draft) in clang?
> An implementation targetting the parser and AST components as a first
> step would be already sufficient for me.
> Thus I could and would dig into it  (I just need something like parfor
> to overcome these openmp-like pragma hell).
> Then someone (else) could work on the trickier codegen part and
> implement the semantics of the predefined attributes.
> Best regards
> Olaf Krzikalla

clang already has a parser of C++0x attributes. It's a bit dated though, 
as it does not reflect many changes made in the FCD. My SOC proposal 
focuses on cleaning up attributes a lot. If I am not accepted, I will do 
the same work but at a slower pace.

The standard [[final]], [[noreturn]], and [[aligned]] attributes are 
supported. [[base_check]], [[override]], [[hiding]], and 
[[carries_dependency]] are currently parsed and ignored, although the 
name-checking attributes are checked to make sure they appear on the 
correct sort of declaration.


More information about the cfe-dev mailing list