public typedef created in the scope of every class. */
decl = TYPE_FIELDS (base);
while (!DECL_SELF_REFERENCE_P (decl))
- decl = TREE_CHAIN (decl);
+ decl = DECL_CHAIN (decl);
while (ANON_AGGR_TYPE_P (t))
t = TYPE_CONTEXT (t);
return accessible_p (t, decl, consider_local_p);
#ifdef GATHER_STATISTICS
n_calls_lookup_field_1++;
#endif /* GATHER_STATISTICS */
- for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
+ for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
{
#ifdef GATHER_STATISTICS
n_fields_searched++;
}
/* TYPE is a class type. Return the index of the fields within
- the method vector with name NAME, or -1 is no such field exists. */
+ the method vector with name NAME, or -1 if no such field exists. */
int
lookup_fnfields_1 (tree type, tree name)
if (CLASSTYPE_LAZY_MOVE_CTOR (type))
lazily_declare_fn (sfk_move_constructor, type);
}
- else if (name == ansi_assopname(NOP_EXPR)
- && CLASSTYPE_LAZY_COPY_ASSIGN (type))
- lazily_declare_fn (sfk_copy_assignment, type);
+ else if (name == ansi_assopname (NOP_EXPR))
+ {
+ if (CLASSTYPE_LAZY_COPY_ASSIGN (type))
+ lazily_declare_fn (sfk_copy_assignment, type);
+ if (CLASSTYPE_LAZY_MOVE_ASSIGN (type))
+ lazily_declare_fn (sfk_move_assignment, type);
+ }
else if ((name == dtor_identifier
|| name == base_dtor_identifier
|| name == complete_dtor_identifier
return -1;
}
+/* TYPE is a class type. Return the field within the method vector with
+ name NAME, or NULL_TREE if no such field exists. */
+
+tree
+lookup_fnfields_slot (tree type, tree name)
+{
+ int ix = lookup_fnfields_1 (type, name);
+ if (ix < 0)
+ return NULL_TREE;
+ return VEC_index (tree, CLASSTYPE_METHOD_VEC (type), ix);
+}
+
/* Like lookup_fnfields_1, except that the name is extracted from
FUNCTION, which is a FUNCTION_DECL or a TEMPLATE_DECL. */
{
error ("deleted function %q+D", overrider);
error ("overriding non-deleted function %q+D", basefn);
+ maybe_explain_implicit_delete (overrider);
}
else
{
int ix;
int found = 0;
+ /* A constructor for a class T does not override a function T
+ in a base class. */
+ if (DECL_CONSTRUCTOR_P (fndecl))
+ return 0;
+
for (ix = 0; BINFO_BASE_ITERATE (binfo, ix, base_binfo); ix++)
{
tree basetype = BINFO_TYPE (base_binfo);
functions in this node were selected. This function is effectively
performing a set of member lookups as lookup_fnfield does, but
using the type being converted to as the unique key, rather than the
- field name.
- If LOOKUP_TEMPLATE_CONVS_P is TRUE, the returned TREE_LIST contains
- the non-hidden user-defined template conversion functions too. */
+ field name. */
tree
-lookup_conversions (tree type,
- bool lookup_template_convs_p)
+lookup_conversions (tree type)
{
tree convs, tpl_convs;
tree list = NULL_TREE;
}
}
- if (lookup_template_convs_p == false)
- tpl_convs = NULL_TREE;
-
for (; tpl_convs; tpl_convs = TREE_CHAIN (tpl_convs))
{
tree probe, next;