[PATCH] replaced callable_when_unconsumed annotation with generic callable_when annotation

Aaron Ballman aaron.ballman at gmail.com
Fri Sep 6 11:00:13 PDT 2013


On Fri, Sep 6, 2013 at 1:56 PM, Delesley Hutchins <delesley at google.com> wrote:
>
> With respect to the string literals, the parser will currently accept only a
> single unresolved identifier as an attribute.  Chris wanted to get this
> patch out now, under the expectation that we would update the parser, and
> then change this back after the parser has been updated.  While I do feel
> that we should fix variadic enums in the parser, in the longer term we
> probably want to transition to a full-fledged typestate system, and make
> this a list of Exprs, which must be EnumConstantDecls.  In other words, the
> states would be declared in the code as an arbitrary enum, and would not be
> limited to "consumed" or "unconsumed".

I think the longer term approach is a good idea, but in the short
term, there's not that much holding us back from using identifiers
instead of string literals.  Using string literals is
self-inconsistent, and makes the transition to the long-term goal
harder.

~Aaron



More information about the cfe-commits mailing list