[cfe-commits] [Patch] Forbid C++11 attributes on explicit template instantiation.

Michael Han fragmentshaders at gmail.com
Fri Dec 7 15:41:11 PST 2012


I think we should. I'll update the patch.

This reminds me another place that needs a fix - in
ParseCXX11AttributeSpecifier, when there is a parsing error (e.g. missing
trailing square brackets), the attributes should also be dropped (or maybe
they should not be added to attribute list in first place until we finish
parsing the entire attribute list...)

Cheers
Michael

On Fri, Dec 7, 2012 at 3:32 PM, Richard Smith <richard at metafoo.co.uk> wrote:

> Hi,
>
> Some more test cases:
>
> template [[attr]] void f<int>();
> template class [[attr]] S1<char>;
>
> Do we need to drop the attributes from the ParsingDeclarator after
> diagnosing them?
>
> On Fri, Dec 7, 2012 at 3:08 PM, Michael Han <fragmentshaders at gmail.com>
> wrote:
> > Hi,
> >
> > This small patch forbids C++11 attributes on explicit template
> > instantiations, as required by C++11 [dcl.attr.grammar] p4.
> >
> > Cheers
> > Michael
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121207/b601502e/attachment.html>


More information about the cfe-commits mailing list