The commit extends ClangAttrEmitter of tablegen to generate Attr*::getVariety() functions. The functions returns the variety of the attribute as an enum. I'll use the function in a follow up commit to improve the output of function attributes for ast-print.
I don't think either of these are needed -- Attr inherits from AttributeCommonInfo and that base class already has AttributeCommonInfo::getSyntax() for getting this information. Will that work for your needs?