/* 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)
{
tree param_list = void_list_node;
tree attributes = NULL_TREE;
tree exception_spec = NULL_TREE;
- tree t;
/* The lambda-declarator is optional, but must begin with an opening
parenthesis if present. */
/* Default arguments shall not be specified in the
parameter-declaration-clause of a lambda-declarator. */
- for (t = param_list; t; t = TREE_CHAIN (t))
+ for (tree t = param_list; t; t = TREE_CHAIN (t))
if (TREE_PURPOSE (t))
pedwarn (DECL_SOURCE_LOCATION (TREE_VALUE (t)), OPT_Wpedantic,
"default argument specified for lambda parameter");
/* The function parameters must be in scope all the way until after the
trailing-return-type in case of decltype. */
- for (t = current_binding_level->names; t; t = DECL_CHAIN (t))
- pop_binding (DECL_NAME (t), t);
-
- leave_scope ();
+ pop_bindings_and_leave_scope ();
}
/* Create the function call operator.
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
tree params;
unsigned saved_num_template_parameter_lists;
bool is_declarator = false;
- tree t;
/* In a member-declarator, the only valid interpretation
of a parenthesis is the start of a
}
/* Remove the function parms from scope. */
- for (t = current_binding_level->names; t; t = DECL_CHAIN (t))
- pop_binding (DECL_NAME (t), t);
- leave_scope();
+ pop_bindings_and_leave_scope ();
if (is_declarator)
/* Repeat the main loop. */
the default argument; otherwise the default
argument continues. */
bool error = false;
- tree t;
/* Set ITALP so cp_parser_parameter_declaration_list
doesn't decide to commit to this parse. */
{
begin_scope (sk_function_parms, NULL_TREE);
cp_parser_parameter_declaration_list (parser, &error);
- for (t = current_binding_level->names; t; t = DECL_CHAIN (t))
- pop_binding (DECL_NAME (t), t);
- leave_scope ();
+ pop_bindings_and_leave_scope ();
}
if (!cp_parser_error_occurred (parser) && !error)
done = true;