1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
+ * decl.c (lookup_name_real): Pull out single function here.
+ (select_decl): Not here.
+ (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
+
* decl.c (qualify_lookup): Tweak again.
* pt.c (lookup_template_class): Don't mess with the context of the
&& (!looking_for_template || TREE_CODE (val) != TEMPLATE_DECL))
val = NULL_TREE;
- /* If we have a single function from a using decl, pull it out. */
- if (val && TREE_CODE (val) == OVERLOAD && ! really_overloaded_fn (val))
- val = OVL_FUNCTION (val);
-
return val;
}
val = select_decl (b, flags);
if (scope == global_namespace)
break;
- scope = DECL_CONTEXT (scope);
- if (scope == NULL_TREE)
- scope = global_namespace;
+ scope = CP_DECL_CONTEXT (scope);
}
return val;
}
val = TYPE_MAIN_DECL (IDENTIFIER_TYPE_VALUE (name));
else if (TREE_TYPE (val) == error_mark_node)
val = error_mark_node;
+
+ /* If we have a single function from a using decl, pull it out. */
+ if (TREE_CODE (val) == OVERLOAD && ! really_overloaded_fn (val))
+ val = OVL_FUNCTION (val);
}
else if (from_obj)
val = from_obj;