gcc/cp/ChangeLog:
PR c++/66786
* pt.c (get_template_info): Handle PARM_DECL.
(template_class_depth): Check DECL_P instead of
VAR_OR_FUNCTION_DECL_P.
From-SVN: r234038
+2016-03-07 Patrick Palka <ppalka@gcc.gnu.org>
+
+ PR c++/66786
+ * pt.c (get_template_info): Handle PARM_DECL.
+ (template_class_depth): Check DECL_P instead of
+ VAR_OR_FUNCTION_DECL_P.
+
2016-03-05 Jason Merrill <jason@redhat.com>
PR c++/67364
if (!t || t == error_mark_node)
return NULL;
- if (TREE_CODE (t) == NAMESPACE_DECL)
+ if (TREE_CODE (t) == NAMESPACE_DECL
+ || TREE_CODE (t) == PARM_DECL)
return NULL;
if (DECL_P (t) && DECL_LANG_SPECIFIC (t))
&& uses_template_parms (INNERMOST_TEMPLATE_ARGS (TI_ARGS (tinfo))))
++depth;
- if (VAR_OR_FUNCTION_DECL_P (type))
+ if (DECL_P (type))
type = CP_DECL_CONTEXT (type);
else if (LAMBDA_TYPE_P (type))
type = LAMBDA_TYPE_EXTRA_SCOPE (type);