FreeBSD/contrib/gcc/cp/class.c
/* Returns 1 if the class type currently being defined is either T or
   a nested type of T.  */
Returns 1 if the class type currently being defined is either T or
a nested type of T.
Returns 1 if the class type currently being defined is either T or a nested type of T .
bool
currently_open_class (tree t)
{
  int i;
  for (i = current_class_depth; i > 0; --i)
    {
      tree c;
      if (i == current_class_depth)
	c = current_class_type;
      else
	{
	  if (current_class_stack[i].hidden)
	    break;
	  c = current_class_stack[i].type;
	}
      if (!c)
	continue;
      if (same_type_p (c, t))
	return true;
    }
  return false;
}
bool currently_open_class ( tree t ) { int i ; for ( i = current_class_depth ; i > 0 ; -- i ) { tree c ; if ( i == current_class_depth ) c = current_class_type ; else { if ( current_class_stack [ i ] . hidden ) break ; c = current_class_stack [ i ] . type ; } if ( ! c ) continue ; if ( same_type_p ( c , t ) ) return true ; } return false ; }
Returns 1 if the class type currently being defined is either T or
a nested type of T.
Returns 1 if the class type currently being defined is either T or a nested type of T .
/* We start looking from 1 because entry 0 is from global scope,
     and has no type.  */