FreeBSD/contrib/gcc/cp/name-lookup.c
/* Return the innermost non-namespace binding for NAME from a scope
   containing BINDING, or, if BINDING is NULL, the current scope.  If
   CLASS_P is false, then class bindings are ignored.  */
Return the innermost non-namespace binding for NAME from a scope
containing BINDING, or, if BINDING is NULL, the current scope.  If
CLASS_P is false, then class bindings are ignored.
Return the innermost non - namespace binding for NAME from a scope containing BINDING or if BINDING is NULL the current scope . If CLASS_P is false then class bindings are ignored .
cxx_binding *
outer_binding (tree name,
	       cxx_binding *binding,
	       bool class_p)
{
  cxx_binding *outer;
  cxx_scope *scope;
  cxx_scope *outer_scope;
  if (binding)
    {
      scope = binding->scope->level_chain;
      outer = binding->previous;
    }
  else
    {
      scope = current_binding_level;
      outer = IDENTIFIER_BINDING (name);
    }
  outer_scope = outer ? outer->scope : NULL;
  if (class_p)
    while (scope && scope != outer_scope && scope->kind != sk_namespace)
      {
	if (scope->kind == sk_class)
	  {
	    cxx_binding *class_binding;
	    class_binding = get_class_binding (name, scope);
	    if (class_binding)
	      {
		class_binding->previous = outer;
		if (binding)
		  binding->previous = class_binding;
		else
		  IDENTIFIER_BINDING (name) = class_binding;
		return class_binding;
	      }
	  }
	scope = scope->level_chain;
      }
  return outer;
}
cxx_binding * outer_binding ( tree name , cxx_binding * binding , bool class_p ) { cxx_binding * outer ; cxx_scope * scope ; cxx_scope * outer_scope ; if ( binding ) { scope = binding -> scope -> level_chain ; outer = binding -> previous ; } else { scope = current_binding_level ; outer = IDENTIFIER_BINDING ( name ) ; } outer_scope = outer ? outer -> scope : NULL ; if ( class_p ) while ( scope && scope != outer_scope && scope -> kind != sk_namespace ) { if ( scope -> kind == sk_class ) { cxx_binding * class_binding ; class_binding = get_class_binding ( name , scope ) ; if ( class_binding ) { class_binding -> previous = outer ; if ( binding ) binding -> previous = class_binding ; else IDENTIFIER_BINDING ( name ) = class_binding ; return class_binding ; } } scope = scope -> level_chain ; } return outer ; }
Return the innermost non-namespace binding for NAME from a scope
containing BINDING, or, if BINDING is NULL, the current scope.
Return the innermost non - namespace binding for NAME from a scope containing BINDING or if BINDING is NULL the current scope .
/* Because we create class bindings lazily, we might be missing a
     class binding for NAME.  If there are any class binding levels
     between the LAST_BINDING_LEVEL and the scope in which OUTER was
     declared, we must lookup NAME in those class scopes.  */ /* Thread this new class-scope binding onto the
		   IDENTIFIER_BINDING list so that future lookups
		   find it quickly.  */