teak-llvm/clang/lib/Parse
Richard Smith 7bdcc4a9da 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 '[]'.

llvm-svn: 154369
2012-04-10 01:32:12 +00:00
..
CMakeLists.txt Thread Safety: Patch to implement delayed parsing of attributes within a 2011-09-08 17:42:22 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
ParseAST.cpp AST/stats: Don't effectively use an out-of-line function to return a static 2012-03-05 21:42:49 +00:00
ParseCXXInlineMethods.cpp Fix the other place where C++98 work for initializer lists was necessary. 2012-03-20 21:24:03 +00:00
ParseDecl.cpp Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
ParseDeclCXX.cpp Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
ParseExpr.cpp Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
ParseExprCXX.cpp Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
ParseInit.cpp Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
ParseObjc.cpp Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared. 2012-04-06 18:12:22 +00:00
ParsePragma.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
ParsePragma.h Implement #pragma redefine_extname. 2012-02-18 16:12:34 +00:00
Parser.cpp Fix bugs found by -Wconstant-conversion improvements currently under review. 2012-04-09 16:37:11 +00:00
ParseStmt.cpp Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
ParseTemplate.cpp Fix bugs found by -Wconstant-conversion improvements currently under review. 2012-04-09 16:37:11 +00:00
ParseTentative.cpp Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
RAIIObjectsForParser.h Rename Diagnostic to DiagnosticsEngine as per issue 5397 2011-09-25 23:23:43 +00:00