aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2022-01-31 14:15:01 -0500
committerPatrick Palka <ppalka@redhat.com>2022-01-31 14:15:01 -0500
commit0eb06ee9a40a09d2f492461289d69aa39f757e66 (patch)
tree4b906c91ec2850a1fbc51a0d9aa517c87b0e86ef /gcc/cp
parent2cbe5dd54f15e88e0b42567319aa9c8e7bad7946 (diff)
downloadgcc-0eb06ee9a40a09d2f492461289d69aa39f757e66.zip
gcc-0eb06ee9a40a09d2f492461289d69aa39f757e66.tar.gz
gcc-0eb06ee9a40a09d2f492461289d69aa39f757e66.tar.bz2
c++: CONSTRUCTORs are non-deduced contexts [PR104291]
PR c++/104291 gcc/cp/ChangeLog: * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear walk_subtrees if !include_nondeduced_p. Simplify given that cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW. gcc/testsuite/ChangeLog: * g++.dg/template/partial20.C: New test.
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/pt.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index f46a7ad..84d63f9 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -10525,12 +10525,6 @@ for_each_template_parm_r (tree *tp, int *walk_subtrees, void *d)
*walk_subtrees = 0;
break;
- case CONSTRUCTOR:
- if (TREE_TYPE (t) && TYPE_PTRMEMFUNC_P (TREE_TYPE (t))
- && pfd->include_nondeduced_p)
- WALK_SUBTREE (TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (t)));
- break;
-
case INDIRECT_REF:
case COMPONENT_REF:
/* If there's no type, then this thing must be some expression
@@ -10539,6 +10533,7 @@ for_each_template_parm_r (tree *tp, int *walk_subtrees, void *d)
return error_mark_node;
break;
+ case CONSTRUCTOR:
case TRAIT_EXPR:
case PLUS_EXPR:
case MULT_EXPR: