Commit 212e7048 by Mark Mitchell Committed by Mark Mitchell

decl2.c (maybe_retrofit_in_chrg): Don't create in-charge parameters for template functions.

	* decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
	parameters for template functions.
	* pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
	destructors as well as constructors.

From-SVN: r34120
parent 5896bebb
2000-05-23 Mark Mitchell <mark@codesourcery.com>
* decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
parameters for template functions.
* pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
destructors as well as constructors.
2000-05-22 Mark Mitchell <mark@codesourcery.com>
* class.c (build_ctor_vtbl_group): Set inits.
......
......@@ -944,6 +944,11 @@ maybe_retrofit_in_chrg (fn)
if (DECL_HAS_IN_CHARGE_PARM_P (fn))
return;
/* When processing templates we can't know, in general, whether or
not we're going to have virtual baseclasses. */
if (uses_template_parms (fn))
return;
/* We don't need an in-charge parameter for constructors that don't
have virtual bases. */
if (DECL_CONSTRUCTOR_P (fn)
......
......@@ -5784,10 +5784,11 @@ tsubst_decl (t, args, type, in_decl)
in_decl);
}
if (DECL_CONSTRUCTOR_P (r))
if (DECL_CONSTRUCTOR_P (r) || DECL_DESTRUCTOR_P (r))
{
maybe_retrofit_in_chrg (r);
grok_ctor_properties (ctx, r);
if (DECL_CONSTRUCTOR_P (r))
grok_ctor_properties (ctx, r);
}
else if (DECL_OVERLOADED_OPERATOR_P (r))
grok_op_properties (r, DECL_VIRTUAL_P (r), DECL_FRIEND_P (r));
......
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