I’d like to add customs attributes (AS_GNU for the moment) via a clang-plugin using ParsedAttrInfo
.
My attributes have arguments.
void f() __attribute__((MyAttr(A)));
void f2() __attribute__((MyAttr(A, B, C)));
How do I have to write the Spelling
(and maybe other members of the ParsedAttrInfo-class) to have clang match my attributes?
{ParsedAttr::AS_GNU, "MyAttr"}, // works
{ParsedAttr::AS_GNU, "MyAttrT(...)"}, // does not work
{ParsedAttr::AS_GNU, "MyAttrY()"}, // does not work
{ParsedAttr::AS_GNU, "MyAttrZ(1,2,3)"}, // does not work either
I’m unable to find any examples using ParsedAttrInfo, other than the comment in ParsedAttr.h .