Hi,
was having a look to c++/58187 (looks like we are missing a lookup) and
noticed this. It seems obvious to me, I'll commit it later today barring
objections.
Tested x86_64-linux.
Thanks,
Paolo.
////////////////////////
2013-08-19 Paolo Carlini <paolo.carl...@oracle.com>
* parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
Use cp_parser_lookup_name_simple.
Index: parser.c
===================================================================
--- parser.c (revision 201835)
+++ parser.c (working copy)
@@ -8710,15 +8710,8 @@ cp_parser_lambda_introducer (cp_parser* parser, tr
/* Turn the identifier into an id-expression. */
capture_init_expr
- = cp_parser_lookup_name
- (parser,
- capture_id,
- none_type,
- /*is_template=*/false,
- /*is_namespace=*/false,
- /*check_dependency=*/true,
- /*ambiguous_decls=*/NULL,
- capture_token->location);
+ = cp_parser_lookup_name_simple (parser, capture_id,
+ capture_token->location);
if (capture_init_expr == error_mark_node)
{
@@ -11583,13 +11576,8 @@ cp_parser_decltype_expr (cp_parser *parser,
if (identifier_p (expr))
/* Lookup the name we got back from the id-expression. */
- expr = cp_parser_lookup_name (parser, expr,
- none_type,
- /*is_template=*/false,
- /*is_namespace=*/false,
- /*check_dependency=*/true,
- /*ambiguous_decls=*/NULL,
- id_expr_start_token->location);
+ expr = cp_parser_lookup_name_simple (parser, expr,
+ id_expr_start_token->location);
if (expr
&& expr != error_mark_node