[cfe-dev] How to retrieve a custom annotation in an ASTVisitor?

Marcel Schaible via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 2 09:04:43 PDT 2017


Hi everyone,

I attach in my ASTConsumer for certain functions an annotation like this:

bool HandleTopLevelDecl(DeclGroupRef DR) override {

     ...

functionDecl->addAttr(AnnotateAttr::CreateImplicit(FD->getASTContext(), 
"SomeAttribute"));

     ...

}

But how can I later retrieve this annotation in my visitor?

Any hint is welcome ;-)

Thanks


Marcel




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170802/f25bbef7/attachment.html>


More information about the cfe-dev mailing list