I think we should. I'll update the patch.<br><br>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...)<br>
<br>Cheers<br>Michael<br><br><div class="gmail_quote">On Fri, Dec 7, 2012 at 3:32 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Some more test cases:<br>
<br>
template [[attr]] void f<int>();<br>
template class [[attr]] S1<char>;<br>
<br>
Do we need to drop the attributes from the ParsingDeclarator after<br>
diagnosing them?<br>
<div><div class="h5"><br>
On Fri, Dec 7, 2012 at 3:08 PM, Michael Han <<a href="mailto:fragmentshaders@gmail.com">fragmentshaders@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> This small patch forbids C++11 attributes on explicit template<br>
> instantiations, as required by C++11 [dcl.attr.grammar] p4.<br>
><br>
> Cheers<br>
> Michael<br>
><br>
</div></div>> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</blockquote></div><br>