I was hoping to be able to use custom attributes in my source code and be
able to see them in the AST, but even though there are some mentions on the
internet saying this can work, it doesn't seem to.

If I say

class [[random_attribute]] Foo {};

I see nothing in -ast-dump, but if I change it to [[deprecated]], it shows
up.




Assuming this isn't possible, is there another approach with similar
behavior that I can use in a clang plugin to see that I'm "interested" in a
class which doesn't otherwise change its behavior (or require me to modify
and recompile clang)?


Thank you.

--Zac

That said, I did manage to get a plugin working that prints out all the
class names it sees.   After fighting with a lot of boilerplate, the actual
logic part is pretty nice with matchers!
_______________________________________________
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Reply via email to