Allow Objective-c++ to recognise lambdas.
authorIain Sandoe <iain@codesourcery.com>
Wed, 31 Dec 2014 13:58:16 +0000 (13:58 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Wed, 31 Dec 2014 13:58:16 +0000 (13:58 +0000)
commite8ef82d74f40e216b3a1c9707a79a3bd0b6c953d
tree89e697fd28a192c9f4e58f50181106401914964d
parent0d391d25ae4899249202ec9d68a8c576165d5ba2
Allow Objective-c++ to recognise lambdas.

gcc/cp:

* parser.c (cp_parser_primary_expression): If parsing an
objective-c++ message expression fails, see if a lambda is present.
(cp_parser_objc_message_receiver): Don't assume that, if a message
receiver expression fails, it is a hard error.

gcc/testsuite:

* obj-c++.dg/lambda-0.mm New.
* obj-c++.dg/lambda-1.mm New.
* obj-c++.dg/syntax-error-6.mm Adjust for revised error messages.

From-SVN: r219125
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/lambda-0.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/lambda-1.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/syntax-error-6.mm