[cfe-dev] C++0x attributes
Olaf.Krzikalla at tu-dresden.de
Mon Apr 12 07:03:04 PDT 2010
Sean Hunt schrieb:
> 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.
OK, sounds good for me anyway. Of course it would be better as a SOC
project. Where can I sign as a proponent? :-)
I found the "old" attribute support in the clang code, however I wasn't
aware of the fact that the parser already handles the [] syntax.
Though one important thing is the possibility to attach attributes to
statements. If I didn't overlooked something, for the moment you can
attach them to declarations only.
Another thing is the ability to add implementation-defined attributes by
external code (e.g. I'm working on a source-to-source transformator
based on clang and I know of other people doing the same).
More information about the cfe-dev