[cfe-dev] Getting meta-data into Clang's AST

Jan Bierbaum s3306700 at mail.inf.tu-dresden.de
Thu Jul 8 02:01:25 PDT 2010


Hi!

Douglas Gregor meinte am 06.07.2010 18:58:
>> So Clang at this point supports both types of attributes, I would
>> guess?
> 
> Yes.

But to make use of the C++0x style attributes you have to use the
-std=c++0x option, correct?

Is it possible to add custom attributes to Clang without changing it's
code? Are there any hooks? I'm trying to build on top of the binary
distribution of LLVM and Clang just using their libs. Up to now I found
hooks in the preprocessor to add pragma and comment handlers but nothing
for attributes.

When I just add some custom attributes to the source they are parse
without any error but then just discarded. All I need is to have them in
the AST besides the built-in ones.


Regards, Jan.



More information about the cfe-dev mailing list