]> gcc.gnu.org Git - gcc.git/commitdiff
Adjust fix for PR c++/66786
authorPatrick Palka <ppalka@gcc.gnu.org>
Mon, 7 Mar 2016 17:09:53 +0000 (17:09 +0000)
committerPatrick Palka <ppalka@gcc.gnu.org>
Mon, 7 Mar 2016 17:09:53 +0000 (17:09 +0000)
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

gcc/cp/ChangeLog
gcc/cp/pt.c

index a803ec984863f18a01acf4fee12ee4cc4daf0f70..f58e34ecd20645f266be9325f6eae28784314dbf 100644 (file)
@@ -1,3 +1,10 @@
+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
index f6dd75a89aadcf9abfa113b59f2f4a171018fe80..515537b384b3f736042eb4651075e4d0e52606d6 100644 (file)
@@ -330,7 +330,8 @@ get_template_info (const_tree t)
   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))
@@ -378,7 +379,7 @@ template_class_depth (tree type)
          && 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);
This page took 0.091603 seconds and 5 git commands to generate.