Commit 60917625 by Benjamin Kosnik

pt.c (decl_template_parm_p): Add checks for TEMPLATE_TEMPLATE_PARM.

�
1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
        * pt.c (decl_template_parm_p): Add checks for
        TEMPLATE_TEMPLATE_PARM.

From-SVN: r22071
parent d84f4821
...@@ -1458,15 +1458,24 @@ int comp_template_parms (parms1, parms2) ...@@ -1458,15 +1458,24 @@ int comp_template_parms (parms1, parms2)
int decl_template_parm_p (old_decl) int decl_template_parm_p (old_decl)
tree old_decl; tree old_decl;
{ {
if (TREE_CODE_CLASS (TREE_CODE (old_decl)) == 'd' /* For template template parms. */
/* For template type parameters. */ if (TREE_CODE (old_decl) == TEMPLATE_DECL
&& ((TREE_TYPE (old_decl) && TREE_TYPE (old_decl)
&& TREE_CODE (TREE_TYPE (old_decl)) == TEMPLATE_TEMPLATE_PARM)
return 1;
/* For template type parms. */
if (TREE_CODE (old_decl) == TYPE_DECL
&& TREE_TYPE (old_decl)
&& TREE_CODE (TREE_TYPE (old_decl)) == TEMPLATE_TYPE_PARM) && TREE_CODE (TREE_TYPE (old_decl)) == TEMPLATE_TYPE_PARM)
/* For non-type template parameters. */
|| (DECL_INITIAL (old_decl)
&& TREE_CODE (DECL_INITIAL (old_decl)) == TEMPLATE_PARM_INDEX)))
return 1; return 1;
else
/* For template non-type parms. */
if (TREE_CODE (old_decl) == CONST_DECL
&& DECL_INITIAL (old_decl)
&& TREE_CODE (DECL_INITIAL (old_decl)) == TEMPLATE_PARM_INDEX)
return 1;
return 0; return 0;
} }
......
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