From bc0c6b150e8695742921655f51267c53ec8db09a Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sat, 16 Mar 2013 22:39:37 -0400 Subject: [PATCH] parser.c (cp_parser_lambda_declarator_opt): Use cp_parser_trailing_type_id. * parser.c (cp_parser_lambda_declarator_opt): Use cp_parser_trailing_type_id. From-SVN: r196745 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/parser.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5e42ff59aee..e6dec021c4b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2013-03-16 Jason Merrill + * parser.c (cp_parser_lambda_declarator_opt): Use + cp_parser_trailing_type_id. + PR c++/45917 * parser.c (cp_parser_template_id): Don't forget access checks. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 47ff995ed34..8b6dbe1dad9 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -8554,7 +8554,8 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) if (cp_lexer_next_token_is (parser->lexer, CPP_DEREF)) { cp_lexer_consume_token (parser->lexer); - LAMBDA_EXPR_RETURN_TYPE (lambda_expr) = cp_parser_type_id (parser); + LAMBDA_EXPR_RETURN_TYPE (lambda_expr) + = cp_parser_trailing_type_id (parser); } /* The function parameters must be in scope all the way until after the