]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pt.c (mark_template_parm): Use template_parm_level_and_index.
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 14 Apr 2014 09:29:09 +0000 (09:29 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 14 Apr 2014 09:29:09 +0000 (09:29 +0000)
2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>

* pt.c (mark_template_parm): Use template_parm_level_and_index.

From-SVN: r209360

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

index bf61ab7564b101041c8111f511daba2a58f202ef..5e1043bd1653263bb1e7c4ad894664221f986371 100644 (file)
@@ -1,3 +1,7 @@
+2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * pt.c (mark_template_parm): Use template_parm_level_and_index.
+
 2014-04-11  Jason Merrill  <jason@redhat.com>
 
        * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
index 318c32507ef87d0893a03bc5e72469b071583d54..c74e7ae7586088c1e56ca198e9d2b4ee3d718411 100644 (file)
@@ -4028,16 +4028,7 @@ mark_template_parm (tree t, void* data)
   int idx;
   struct template_parm_data* tpd = (struct template_parm_data*) data;
 
-  if (TREE_CODE (t) == TEMPLATE_PARM_INDEX)
-    {
-      level = TEMPLATE_PARM_LEVEL (t);
-      idx = TEMPLATE_PARM_IDX (t);
-    }
-  else
-    {
-      level = TEMPLATE_TYPE_LEVEL (t);
-      idx = TEMPLATE_TYPE_IDX (t);
-    }
+  template_parm_level_and_index (t, &level, &idx);
 
   if (level == tpd->level)
     {