+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.
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
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),
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;
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;