pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 1 Aug 2014 09:43:07 +0000 (09:43 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 1 Aug 2014 09:43:07 +0000 (09:43 +0000)
2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>

* pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.

From-SVN: r213433

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

index 89a6a7b9e0266954164e07f4a835fd2b0e7ca650..62e4fe49c6b9a03f5eef9fe3f4ee00bcde320137 100644 (file)
@@ -1,3 +1,7 @@
+2014-08-01  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
+
 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
 
        * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
index baabcb1aa5b93aa0e1599803e7075154fdadcb35..e220efedf67528a9f091d596b1f192598f30e7f9 100644 (file)
@@ -7414,9 +7414,7 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context,
       templ = TYPE_TI_TEMPLATE (d1);
       d1 = DECL_NAME (templ);
     }
-  else if (TREE_CODE (d1) == TEMPLATE_DECL
-           && DECL_TEMPLATE_RESULT (d1)
-          && TREE_CODE (DECL_TEMPLATE_RESULT (d1)) == TYPE_DECL)
+  else if (DECL_TYPE_TEMPLATE_P (d1))
     {
       templ = d1;
       d1 = DECL_NAME (templ);