/* None of the lookups that use qualify_lookup want the op() from the
lambda; they want the one from the enclosing class. */
- val = OVL_FIRST (val);
- if (LAMBDA_FUNCTION_P (val))
- return true;
+ if (tree fns = maybe_get_fns (val))
+ if (LAMBDA_FUNCTION_P (OVL_FIRST (fns)))
+ return true;
return false;
}
{
tree context;
- if (TREE_CODE (decl) == OVERLOAD)
+ if (is_overloaded_fn (decl))
context = ovl_scope (decl);
else
{
/*protect=*/2, /*want_type=*/false,
tf_warning_or_error);
- if (value_binding
- && (TREE_CODE (value_binding) == TYPE_DECL
- || DECL_CLASS_TEMPLATE_P (value_binding)
- || (TREE_CODE (value_binding) == TREE_LIST
- && TREE_TYPE (value_binding) == error_mark_node
- && (TREE_CODE (TREE_VALUE (value_binding))
- == TYPE_DECL))))
- /* We found a type binding, even when looking for a non-type
- binding. This means that we already processed this binding
- above. */
- ;
- else if (value_binding)
- {
- if (TREE_CODE (value_binding) == TREE_LIST
- && TREE_TYPE (value_binding) == error_mark_node)
- /* NAME is ambiguous. */
- ;
- else if (BASELINK_P (value_binding))
- /* NAME is some overloaded functions. */
- value_binding = BASELINK_FUNCTIONS (value_binding);
- }
-
/* If we found either a type binding or a value binding, create a
new binding object. */
if (type_binding || value_binding)