FreeBSD/contrib/gcc/cp/tree.c
/* Returns true if decl is within an anonymous namespace, however deeply
   nested, or false otherwise.  */
Returns true if decl is within an anonymous namespace, however deeply
nested, or false otherwise.
Returns true if decl is within an anonymous namespace however deeply nested or false otherwise .
bool
decl_anon_ns_mem_p (tree decl)
{
  while (1)
    {
      if (decl == NULL_TREE || decl == error_mark_node)
	return false;
      if (TREE_CODE (decl) == NAMESPACE_DECL
	  && DECL_NAME (decl) == NULL_TREE)
	return true;
      else if (TYPE_P (decl))
	return (TREE_PUBLIC (TYPE_NAME (decl)) == 0);
      else if (TREE_CODE (decl) == NAMESPACE_DECL)
	return (TREE_PUBLIC (decl) == 0);
      else
	decl = DECL_CONTEXT (decl);
    }
}
bool decl_anon_ns_mem_p ( tree decl ) { while ( 1 ) { if ( decl == NULL_TREE || decl == error_mark_node ) return false ; if ( TREE_CODE ( decl ) == NAMESPACE_DECL && DECL_NAME ( decl ) == NULL_TREE ) return true ; else if ( TYPE_P ( decl ) ) return ( TREE_PUBLIC ( TYPE_NAME ( decl ) ) == 0 ) ; else if ( TREE_CODE ( decl ) == NAMESPACE_DECL ) return ( TREE_PUBLIC ( decl ) == 0 ) ; else decl = DECL_CONTEXT ( decl ) ; } }
Returns true if decl is within an anonymous namespace, however deeply
nested, or false otherwise.
Returns true if decl is within an anonymous namespace however deeply nested or false otherwise .
/* Classes and namespaces inside anonymous namespaces have
         TREE_PUBLIC == 0, so we can shortcut the search.  */