I'd like to kill off AttributeList, which is our Parser-side
representation of attributes. It will be replaced with having Sema
hand back actual Attr objects--the AST nodes--to Parser. Currently
this would result in loss of some source location information, but
that's an issue anyway since the AST should represent the source
precisely and it doesn't now.
The idea is that tablegen will generate ActOnFooAttr for all values of
Foo, and these methods will each have a correct argument list for that
attribute, rather than the frightening "generic" code in place on
AttributeList. tablegen will generate calls to the correct parsing
functions for each argument, and hopefully be able to generate the
portion of the semantic checking code that verifies that an attribute
is applied to the correct things. Additional argument checking will
probably be done manually (e.g. making sure that arguments to nonnull
correspond to real parameters).
I have a sort-of prototype of this built by putting an Attr inside
AttributeList as a stopgap, but it hasn't been updated in enough
places for me to feel comfortable posting a patch. I can if people
would really like to see it, though.