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
This commit is contained in:
Jason Merrill 2013-03-16 22:39:37 -04:00 committed by Jason Merrill
parent cae7d26460
commit bc0c6b150e
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2013-03-16 Jason Merrill <jason@redhat.com>
* 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.

View File

@ -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