[cfe-dev] Getting meta-data into Clang's AST
dgregor at apple.com
Tue Jul 6 09:58:16 PDT 2010
On Jul 6, 2010, at 9:43 AM, chris nuernberger wrote:
> Ah, I see, thanks for that info.
> So Clang at this point supports both types of attributes, I would
> Are there examples using one or the other (ideally the c++0x
The GCC documentation has examples of GNU-style attributes. The C++0x standard and the attributes papers have examples of C++0x attributes.
> Where are these objects placed on the AST?
Typically, they are Attr objects (subclasses of Attr) that reside on Decl nodes in the AST.
Some attributes also have an effect on the type system, and are translated into bits in the Type classes, but you should think long and hard before adding another such attribute: changing types often has more consequences that one realizes.
More information about the cfe-dev