Commit 6b945830 by Jason Merrill Committed by Jason Merrill

* decl.c (qualify_lookup): Tweak again.

From-SVN: r21266
parent c3baf4b5
1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (qualify_lookup): Tweak again.
* pt.c (lookup_template_class): Don't mess with the context of the
instantiation.
* decl2.c (current_decl_namespace): Remove special handling for
......
......@@ -4880,12 +4880,14 @@ qualify_lookup (val, flags)
{
if (val == NULL_TREE)
return val;
if (LOOKUP_NAMESPACES_ONLY (flags) && TREE_CODE (val) != NAMESPACE_DECL)
return NULL_TREE;
if (LOOKUP_TYPES_ONLY (flags) && TREE_CODE (val) != TYPE_DECL
&& ! ((flags & LOOKUP_TEMPLATES_EXPECTED)
&& TREE_CODE (val) == TEMPLATE_DECL
&& DECL_CLASS_TEMPLATE_P (val)))
if ((flags & LOOKUP_PREFER_NAMESPACES) && TREE_CODE (val) == NAMESPACE_DECL)
return val;
if ((flags & LOOKUP_PREFER_TYPES)
&& (TREE_CODE (val) == TYPE_DECL
|| ((flags & LOOKUP_TEMPLATES_EXPECTED)
&& DECL_CLASS_TEMPLATE_P (val))))
return val;
if (flags & (LOOKUP_PREFER_NAMESPACES | LOOKUP_PREFER_TYPES))
return NULL_TREE;
return val;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment