FreeBSD/contrib/gcc/cp/class.c
/* Add the overrider along the current path to FFOD->CANDIDATES.
   Returns true if an overrider was found; false otherwise.  */
Add the overrider along the current path to FFOD->CANDIDATES.
Returns true if an overrider was found; false otherwise.
Add the overrider along the current path to FFOD - > CANDIDATES . Returns true if an overrider was found ; false otherwise .
static bool
dfs_find_final_overrider_1 (tree binfo,
			    find_final_overrider_data *ffod,
			    unsigned depth)
{
  tree method;
  if (depth)
    {
      depth--;
      if (dfs_find_final_overrider_1
	  (VEC_index (tree, ffod->path, depth), ffod, depth))
	return true;
    }
  method = look_for_overrides_here (BINFO_TYPE (binfo), ffod->fn);
  if (method)
    {
      tree *candidate = &ffod->candidates;
      while (*candidate)
	{
	  if (base_derived_from (TREE_VALUE (*candidate), binfo))
	    return true;
	  if (base_derived_from (binfo, TREE_VALUE (*candidate)))
	    *candidate = TREE_CHAIN (*candidate);
	  else
	    candidate = &TREE_CHAIN (*candidate);
	}
      ffod->candidates = tree_cons (method, binfo, ffod->candidates);
      return true;
    }
  return false;
}
static bool dfs_find_final_overrider_1 ( tree binfo , find_final_overrider_data * ffod , unsigned depth ) { tree method ; if ( depth ) { depth -- ; if ( dfs_find_final_overrider_1 ( VEC_index ( tree , ffod -> path , depth ) , ffod , depth ) ) return true ; } method = look_for_overrides_here ( BINFO_TYPE ( binfo ) , ffod -> fn ) ; if ( method ) { tree * candidate = & ffod -> candidates ; while ( * candidate ) { if ( base_derived_from ( TREE_VALUE ( * candidate ) , binfo ) ) return true ; if ( base_derived_from ( binfo , TREE_VALUE ( * candidate ) ) ) * candidate = TREE_CHAIN ( * candidate ) ; else candidate = & TREE_CHAIN ( * candidate ) ; } ffod -> candidates = tree_cons ( method , binfo , ffod -> candidates ) ; return true ; } return false ; }
Add the overrider along the current path to FFOD->CANDIDATES.
Add the overrider along the current path to FFOD - > CANDIDATES .
/* If BINFO is not the most derived type, try a more derived class.
     A definition there will overrider a definition here.  */ /* Remove any candidates overridden by this new function.  */ /* If *CANDIDATE overrides METHOD, then METHOD
	     cannot override anything else on the list.  */ /* If METHOD overrides *CANDIDATE, remove *CANDIDATE.  */ /* Add the new function.  */