FreeBSD/contrib/gcc/cp/name-lookup.c
/* Exit the current scope INNER back to scope OUTER.  */
Exit the current scope INNER back to scope OUTER.
Exit the current scope INNER back to scope OUTER .
void
pop_inner_scope (tree outer, tree inner)
{
  if (outer == inner
      || (TREE_CODE (inner) != NAMESPACE_DECL && !CLASS_TYPE_P (inner)))
    return;
  while (outer != inner)
    {
      if (TREE_CODE (inner) == NAMESPACE_DECL)
	{
	  struct cp_binding_level *save_template_parm = 0;
	  while (current_binding_level->kind == sk_template_parms)
	    {
	      struct cp_binding_level *b = current_binding_level;
	      current_binding_level = b->level_chain;
	      b->level_chain = save_template_parm;
	      save_template_parm = b;
	    }
	  pop_namespace ();
	  while (save_template_parm)
	    {
	      struct cp_binding_level *b = save_template_parm;
	      save_template_parm = b->level_chain;
	      b->level_chain = current_binding_level;
	      current_binding_level = b;
	    }
	}
      else
	popclass ();
      inner = CP_DECL_CONTEXT (TREE_CODE (inner) == NAMESPACE_DECL ? inner : TYPE_NAME (inner));
    }
}
void pop_inner_scope ( tree outer , tree inner ) { if ( outer == inner || ( TREE_CODE ( inner ) != NAMESPACE_DECL && ! CLASS_TYPE_P ( inner ) ) ) return ; while ( outer != inner ) { if ( TREE_CODE ( inner ) == NAMESPACE_DECL ) { struct cp_binding_level * save_template_parm = 0 ; while ( current_binding_level -> kind == sk_template_parms ) { struct cp_binding_level * b = current_binding_level ; current_binding_level = b -> level_chain ; b -> level_chain = save_template_parm ; save_template_parm = b ; } pop_namespace ( ) ; while ( save_template_parm ) { struct cp_binding_level * b = save_template_parm ; save_template_parm = b -> level_chain ; b -> level_chain = current_binding_level ; current_binding_level = b ; } } else popclass ( ) ; inner = CP_DECL_CONTEXT ( TREE_CODE ( inner ) == NAMESPACE_DECL ? inner : TYPE_NAME ( inner ) ) ; } }
Exit the current scope INNER back to scope OUTER.
Exit the current scope INNER back to scope OUTER .
/* Temporary take out template parameter scopes.  They are saved
	     in reversed order in save_template_parm.  */ /* Restore template parameter scopes.  */