Patch updated. The attributes are "dropped" by marking as invalid so they
don't participate in semantic checking.

Cheers
Michael

On Fri, Dec 7, 2012 at 3:41 PM, Michael Han <[email protected]>wrote:

> 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 <[email protected]>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 <[email protected]>
>> 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
>> > [email protected]
>> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>> >
>>
>
>

Attachment: templateattr.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to