2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Apr 2014 09:29:09 +0000 (09:29 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Apr 2014 09:29:09 +0000 (09:29 +0000)
* pt.c (mark_template_parm): Use template_parm_level_and_index.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209360 138bc75d-0d04-0410-961f-82ee72b054a4

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

index bf61ab7..5e1043b 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 318c325..c74e7ae 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)
     {