aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.cc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2024-06-25 20:07:15 -0400
committerPatrick Palka <ppalka@redhat.com>2024-06-25 20:07:15 -0400
commit737449e5f233feb682b5dd2cc153892ad90a79bd (patch)
treeae0837172adba2c96f72f7b7f10fedc4d882b54a /gcc/cp/semantics.cc
parent3e64a687a303dd550df072676c853d79076de37f (diff)
downloadgcc-737449e5f233feb682b5dd2cc153892ad90a79bd.zip
gcc-737449e5f233feb682b5dd2cc153892ad90a79bd.tar.gz
gcc-737449e5f233feb682b5dd2cc153892ad90a79bd.tar.bz2
c++: decltype of capture proxy of ref [PR115504]
The finish_decltype_type capture proxy handling added in r14-5330 was incorrectly stripping references in the type of the captured variable. PR c++/115504 gcc/cp/ChangeLog: * semantics.cc (finish_decltype_type): Don't strip the reference type (if any) of a capture proxy's captured variable. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/decltype-auto8.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/cp/semantics.cc')
-rw-r--r--gcc/cp/semantics.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc
index 8e3e4e2..44de4c9 100644
--- a/gcc/cp/semantics.cc
+++ b/gcc/cp/semantics.cc
@@ -12071,7 +12071,6 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
{
expr = DECL_CAPTURED_VARIABLE (expr);
type = TREE_TYPE (expr);
- type = non_reference (type);
}
else
{