[cfe-dev] Killing AttributeList

Douglas Gregor dgregor at apple.com
Tue Aug 7 10:52:00 PDT 2012


On Aug 7, 2012, at 7:36 AM, Sean Hunt <scshunt at csclub.uwaterloo.ca> wrote:

> Hey devs,
> 
> 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 think this is a splendid idea, but it's a big change. How are you planning to stage the introduction of this refactoring?

	- Doug



More information about the cfe-dev mailing list