FreeBSD/contrib/gcc/cp/name-lookup.c
/* Given a lookup that returned VAL, use FLAGS to decide if we want to
   ignore it or not.  Subroutine of lookup_name_real and
   lookup_type_scope.  */
Given a lookup that returned VAL, use FLAGS to decide if we want to
ignore it or not.
Given a lookup that returned VAL use FLAGS to decide if we want to ignore it or not .
static bool
qualify_lookup (tree val, int flags)
{
  if (val == NULL_TREE)
    return false;
  if ((flags & LOOKUP_PREFER_NAMESPACES) && TREE_CODE (val) == NAMESPACE_DECL)
    return true;
  if ((flags & LOOKUP_PREFER_TYPES)
      && (TREE_CODE (val) == TYPE_DECL || TREE_CODE (val) == TEMPLATE_DECL))
    return true;
  if (flags & (LOOKUP_PREFER_NAMESPACES | LOOKUP_PREFER_TYPES))
    return false;
  return true;
}
static bool qualify_lookup ( tree val , int flags ) { if ( val == NULL_TREE ) return false ; if ( ( flags & LOOKUP_PREFER_NAMESPACES ) && TREE_CODE ( val ) == NAMESPACE_DECL ) return true ; if ( ( flags & LOOKUP_PREFER_TYPES ) && ( TREE_CODE ( val ) == TYPE_DECL || TREE_CODE ( val ) == TEMPLATE_DECL ) ) return true ; if ( flags & ( LOOKUP_PREFER_NAMESPACES | LOOKUP_PREFER_TYPES ) ) return false ; return true ; }
Given a lookup that returned VAL, use FLAGS to decide if we want to
ignore it or not.
Given a lookup that returned VAL use FLAGS to decide if we want to ignore it or not .