[cfe-commits] [PATCH] Allow typedef with unnecessary "typename" when ms-extensions are enabled.

Will Wilson will at indefiant.com
Mon May 7 04:23:27 PDT 2012


> You should consume the 'typename' token, and try to recover as if the
> 'typename' keyword were not present, following the logic present later on in
> that function. As a special case, if that later logic were to find that the
> tokens after the 'typename' keyword can't be annotated as a type name, you
> should produce a hard error (even with MS extensions enabled).
>
> (In particular, for 'typename identifier', it will be the identifier you
> annotate, not the 'typename' keyword.)

Sorry for the delay! I've attached an updated patch (with test cases)
that seems to do the job. I've also had to update two other tests to
allow for the different code paths (and thus different errors)
followed due to the attempt at recovering from the error.

All tests pass locally. It'd be great if some other people could
verify it as well.

Many thanks,
Will.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unecessary_typename_msext.diff
Type: application/octet-stream
Size: 4305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120507/80b43e25/attachment.obj>


More information about the cfe-commits mailing list