clang-1/test/CXX/dcl.dcl
Richard Smith 6ee326af4e Disambiguation of '[[':
* In C++11, '[[' is ill-formed unless it starts an attribute-specifier. Reject
   array sizes and array indexes which begin with a lambda-expression. Recover by
   parsing the lambda as a lambda.
 * In Objective-C++11, either '[' could be the start of a message-send.
   Fully disambiguate this case: it turns out that the grammars of message-sends,
   lambdas and attributes do not actually overlap. Accept any occurrence of '[['
   where either '[' starts a message send, but reject a lambda in an array index
   just like in C++11 mode.

Implement a couple of changes to the attribute wording which occurred after our
attributes implementation landed:
 * In a function-declaration, the attributes go after the exception specification,
   not after the right paren.
 * A reference type can have attributes applied.
 * An 'identifier' in an attribute can also be a keyword. Support for alternative
   tokens (iso646 keywords) in attributes to follow.

And some bug fixes:
 * Parse attributes after declarator-ids, even if they are not simple identifiers.
 * Do not accept attributes after a parenthesized declarator.
 * Accept attributes after an array size in a new-type-id.
 * Partially disamiguate 'delete' followed by a lambda. More work is required
   here for the case where the lambda-introducer is '[]'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154369 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-10 01:32:12 +00:00
..
basic.namespace Fix PR10447: lazily building name lookup tables for DeclContexts was broken. 2012-03-13 03:12:56 +00:00
dcl.attr/dcl.attr.grammar Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
dcl.enum Improve handling of enumerator values for C and C++, including: 2010-02-01 23:36:03 +00:00
dcl.link Switch CodeGen's "is this variable declaration a definition?" logic 2010-02-06 05:15:45 +00:00
dcl.spec Temporary workaround for bug#12457: turn the 'constexpr function never produces 2012-04-05 18:57:10 +00:00
p4-0x.cpp static_assert: Allow any string-literal as the message, not just a character 2012-03-05 23:20:05 +00:00