FreeBSD/contrib/gcc/cp/name-lookup.c
/* Subroutine of unqualified_namespace_lookup:
   Add the bindings of NAME in used namespaces to VAL.
   We are currently looking for names in namespace SCOPE, so we
   look through USINGS for using-directives of namespaces
   which have SCOPE as a common ancestor with the current scope.
   Returns false on errors.  */
Subroutine of unqualified_namespace_lookup:
Add the bindings of NAME in used namespaces to VAL.
We are currently looking for names in namespace SCOPE, so we
look through USINGS for using-directives of namespaces
which have SCOPE as a common ancestor with the current scope.
Returns false on errors.
Subroutine of unqualified_namespace_lookup : Add the bindings of NAME in used namespaces to VAL . We are currently looking for names in namespace SCOPE so we look through USINGS for using - directives of namespaces which have SCOPE as a common ancestor with the current scope . Returns false on errors .
static bool
lookup_using_namespace (tree name, struct scope_binding *val,
			tree usings, tree scope, int flags)
{
  tree iter;
  timevar_push (TV_NAME_LOOKUP);
  for (iter = usings; iter; iter = TREE_CHAIN (iter))
    if (TREE_VALUE (iter) == scope)
      {
	tree used = ORIGINAL_NAMESPACE (TREE_PURPOSE (iter));
	cxx_binding *val1 =
	  cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (used), name);
	if (val1)
	  ambiguous_decl (val, val1, flags);
      }
  POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val->value != error_mark_node);
}
static bool lookup_using_namespace ( tree name , struct scope_binding * val , tree usings , tree scope , int flags ) { tree iter ; timevar_push ( TV_NAME_LOOKUP ) ; for ( iter = usings ; iter ; iter = TREE_CHAIN ( iter ) ) if ( TREE_VALUE ( iter ) == scope ) { tree used = ORIGINAL_NAMESPACE ( TREE_PURPOSE ( iter ) ) ; cxx_binding * val1 = cxx_scope_find_binding_for_name ( NAMESPACE_LEVEL ( used ) , name ) ; if ( val1 ) ambiguous_decl ( val , val1 , flags ) ; } POP_TIMEVAR_AND_RETURN ( TV_NAME_LOOKUP , val -> value != error_mark_node ) ; }
Subroutine of unqualified_namespace_lookup:
Add the bindings of NAME in used namespaces to VAL.
Subroutine of unqualified_namespace_lookup : Add the bindings of NAME in used namespaces to VAL .
/* Iterate over all used namespaces in current, searching for using
     directives of scope.  */ /* Resolve ambiguities.  */ /* LLVM LOCAL mainline */