aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2014-08-01 09:43:07 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2014-08-01 09:43:07 +0000
commitcd916532cfb9d71581ba8b1749d669d5d63cfa8c (patch)
tree07ae124ad66b165c018b78f2ee1aca12e49adc64 /gcc
parent78f8727c3af1dbdcf56f698d15c0f4b046009253 (diff)
downloadgcc-cd916532cfb9d71581ba8b1749d669d5d63cfa8c.zip
gcc-cd916532cfb9d71581ba8b1749d669d5d63cfa8c.tar.gz
gcc-cd916532cfb9d71581ba8b1749d669d5d63cfa8c.tar.bz2
pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
2014-08-01 Paolo Carlini <paolo.carlini@oracle.com> * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P. From-SVN: r213433
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/pt.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 89a6a7b..62e4fe4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index baabcb1..e220efe 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -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);