[cfe-dev] TreeTransform and adding Attr to the source

Maximilian Odendahl maxodendahl at gmail.com
Fri Jul 18 11:37:50 PDT 2014


Hi,

we have a source-to-source tool using an ASTConsumer and TreeTransform 
transformation. I am now trying to add an attribute to the AST so it 
shows up in my target file as well, therefore I add it to a Decl such as

D->addAttr( ::new (SemaRef.Context) AnnotateAttr("hallo"));

or

D->addAttr( ::new (SemaRef.Context)NoinlineAttr());


But it does not show up. Should this show up and I am doing something 
wrong or is this not supported using TreeTransform

Thanks for your help,
Max



More information about the cfe-dev mailing list