FreeBSD/contrib/gcc/cp/name-lookup.c
/* Similar to `lookup_name' but look only in the innermost non-class
   binding level.  */
Similar to `lookup_name' but look only in the innermost non-class
binding level.
Similar to ` lookup_name ' but look only in the innermost non - class binding level .
static tree
lookup_name_innermost_nonclass_level (tree name)
{
  struct cp_binding_level *b;
  tree t = NULL_TREE;
  timevar_push (TV_NAME_LOOKUP);
  b = innermost_nonclass_level ();
  if (b->kind == sk_namespace)
    {
      t = IDENTIFIER_NAMESPACE_VALUE (name);
      if (t != NULL_TREE && TREE_CODE (t) == TREE_LIST)
	t = TREE_VALUE (t);
    }
  else if (IDENTIFIER_BINDING (name)
	   && LOCAL_BINDING_P (IDENTIFIER_BINDING (name)))
    {
      cxx_binding *binding;
      binding = IDENTIFIER_BINDING (name);
      while (1)
	{
	  if (binding->scope == b
	      && !(TREE_CODE (binding->value) == VAR_DECL
		   && DECL_DEAD_FOR_LOCAL (binding->value)))
	    POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, binding->value);
	  if (b->kind == sk_cleanup)
	    b = b->level_chain;
	  else
	    break;
	}
    }
  POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t);
}
static tree lookup_name_innermost_nonclass_level ( tree name ) { struct cp_binding_level * b ; tree t = NULL_TREE ; timevar_push ( TV_NAME_LOOKUP ) ; b = innermost_nonclass_level ( ) ; if ( b -> kind == sk_namespace ) { t = IDENTIFIER_NAMESPACE_VALUE ( name ) ; if ( t != NULL_TREE && TREE_CODE ( t ) == TREE_LIST ) t = TREE_VALUE ( t ) ; } else if ( IDENTIFIER_BINDING ( name ) && LOCAL_BINDING_P ( IDENTIFIER_BINDING ( name ) ) ) { cxx_binding * binding ; binding = IDENTIFIER_BINDING ( name ) ; while ( 1 ) { if ( binding -> scope == b && ! ( TREE_CODE ( binding -> value ) == VAR_DECL && DECL_DEAD_FOR_LOCAL ( binding -> value ) ) ) POP_TIMEVAR_AND_RETURN ( TV_NAME_LOOKUP , binding -> value ) ; if ( b -> kind == sk_cleanup ) b = b -> level_chain ; else break ; } } POP_TIMEVAR_AND_RETURN ( TV_NAME_LOOKUP , t ) ; }
Similar to `lookup_name' but look only in the innermost non-class
binding level.
Similar to ` lookup_name ' but look only in the innermost non - class binding level .
/* extern "C" function() */