> On Jan 23, 2015, at 11:28 AM, Richard Smith <[email protected]> wrote:
> We can implement that (by performing lookahead after parsing an anonymous
> class in a typedef and before parsing method bodies etc), we just don't do so
> yet. This is also not just an IR generation problem, there are also semantic
> reasons why we might care about linkage.
>
Lookahead is a better solution than delaying diagnostics and not caching
linkage. :) We’d need another arbitrary-lookahead tentative parser, because
the typedef name isn’t necessarily the first declarator, but the fact that you
can’t semantically have top-level expressions in there means that you can
indeed do this without incorporating semantic information from prior
declarators into lookup.
John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits