Commit ae34ce04 by Paolo Carlini Committed by Paolo Carlini

friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.

2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
	* pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
	(for_each_template_parm_r): Use TYPE_TI_ARGS.

From-SVN: r197356
parent 90eb75f2
2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
* friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
* pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
(for_each_template_parm_r): Use TYPE_TI_ARGS.
2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (TAGGED_TYPE_P): Remove.
(IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
(TYPE_ANONYMOUS_P): Adjust.
......
......@@ -485,8 +485,7 @@ do_friend (tree ctype, tree declarator, tree decl,
to be a friend, so we do lookup here even if CTYPE is in
the process of being defined. */
if (class_template_depth
|| COMPLETE_TYPE_P (ctype)
|| (CLASS_TYPE_P (ctype) && TYPE_BEING_DEFINED (ctype)))
|| COMPLETE_OR_OPEN_TYPE_P (ctype))
{
if (DECL_TEMPLATE_INFO (decl))
/* DECL is a template specialization. No need to
......
......@@ -3058,10 +3058,7 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
bool parameter_pack_p = false;
/* Handle type aliases/typedefs. */
if (TYPE_P (t)
&& TYPE_NAME (t)
&& TREE_CODE (TYPE_NAME (t)) == TYPE_DECL
&& TYPE_DECL_ALIAS_P (TYPE_NAME (t)))
if (TYPE_ALIAS_P (t))
{
if (TYPE_TEMPLATE_INFO (t))
cp_walk_tree (&TYPE_TI_ARGS (t),
......@@ -3146,7 +3143,7 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
case UNION_TYPE:
case ENUMERAL_TYPE:
if (TYPE_TEMPLATE_INFO (t))
cp_walk_tree (&TI_ARGS (TYPE_TEMPLATE_INFO (t)),
cp_walk_tree (&TYPE_TI_ARGS (t),
&find_parameter_packs_r, ppd, ppd->visited);
*walk_subtrees = 0;
......@@ -7619,7 +7616,7 @@ for_each_template_parm_r (tree *tp, int *walk_subtrees, void *d)
case ENUMERAL_TYPE:
if (!TYPE_TEMPLATE_INFO (t))
*walk_subtrees = 0;
else if (for_each_template_parm (TI_ARGS (TYPE_TEMPLATE_INFO (t)),
else if (for_each_template_parm (TYPE_TI_ARGS (t),
fn, data, pfd->visited,
pfd->include_nondeduced_p))
return error_mark_node;
......
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