saved_in_unbraced_linkage_specification_p
= parser->in_unbraced_linkage_specification_p;
parser->in_unbraced_linkage_specification_p = false;
+ /* 'this' from an enclosing non-static member function is unavailable. */
+ tree saved_ccp = current_class_ptr;
+ tree saved_ccr = current_class_ref;
+ current_class_ptr = NULL_TREE;
+ current_class_ref = NULL_TREE;
/* Start the class. */
if (nested_name_specifier_p)
/* If there are noexcept-specifiers that have not yet been processed,
take care of them now. Do this before processing NSDMIs as they
may depend on noexcept-specifiers already having been processed. */
- tree save_ccp = current_class_ptr;
- tree save_ccr = current_class_ref;
FOR_EACH_VEC_SAFE_ELT (unparsed_noexcepts, ix, decl)
{
tree ctx = DECL_CONTEXT (decl);
cp_parser_late_parsing_nsdmi (parser, decl);
}
vec_safe_truncate (unparsed_nsdmis, 0);
- current_class_ptr = save_ccp;
- current_class_ref = save_ccr;
+ current_class_ptr = NULL_TREE;
+ current_class_ref = NULL_TREE;
if (pushed_scope)
pop_scope (pushed_scope);
= saved_num_template_parameter_lists;
parser->in_unbraced_linkage_specification_p
= saved_in_unbraced_linkage_specification_p;
+ current_class_ptr = saved_ccp;
+ current_class_ref = saved_ccr;
return type;
}