FreeBSD/contrib/gcc/cp/name-lookup.c
/* Add namespace to using_directives. Return NULL_TREE if nothing was
   changed (i.e. there was already a directive), or the fresh
   TREE_LIST otherwise.  */
Add namespace to using_directives. Return NULL_TREE if nothing was
changed , or the fresh
TREE_LIST otherwise.
Add namespace to using_directives . Return NULL_TREE if nothing was changed or the fresh TREE_LIST otherwise .
static tree
push_using_directive (tree used)
{
  tree ud = current_binding_level->using_directives;
  tree iter, ancestor;
  timevar_push (TV_NAME_LOOKUP);
  if (purpose_member (used, ud) != NULL_TREE)
    POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, NULL_TREE);
  ancestor = namespace_ancestor (current_decl_namespace (), used);
  ud = current_binding_level->using_directives;
  ud = tree_cons (used, ancestor, ud);
  current_binding_level->using_directives = ud;
  for (iter = DECL_NAMESPACE_USING (used); iter; iter = TREE_CHAIN (iter))
    push_using_directive (TREE_PURPOSE (iter));
  POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, ud);
}
static tree push_using_directive ( tree used ) { tree ud = current_binding_level -> using_directives ; tree iter , ancestor ; timevar_push ( TV_NAME_LOOKUP ) ; if ( purpose_member ( used , ud ) != NULL_TREE ) POP_TIMEVAR_AND_RETURN ( TV_NAME_LOOKUP , NULL_TREE ) ; ancestor = namespace_ancestor ( current_decl_namespace ( ) , used ) ; ud = current_binding_level -> using_directives ; ud = tree_cons ( used , ancestor , ud ) ; current_binding_level -> using_directives = ud ; for ( iter = DECL_NAMESPACE_USING ( used ) ; iter ; iter = TREE_CHAIN ( iter ) ) push_using_directive ( TREE_PURPOSE ( iter ) ) ; POP_TIMEVAR_AND_RETURN ( TV_NAME_LOOKUP , ud ) ; }
Add namespace to using_directives.
Add namespace to using_directives .
/* Check if we already have this.  */ /* Recursively add all namespaces used.  */