c++: constrained partial spec using qualified name [PR92944, PR103678]
authorPatrick Palka <ppalka@redhat.com>
Thu, 27 Jan 2022 15:56:34 +0000 (10:56 -0500)
committerPatrick Palka <ppalka@redhat.com>
Thu, 27 Jan 2022 15:56:34 +0000 (10:56 -0500)
commitce6054a22ae14594a2919d2ad87cd9478e616fb3
treeb9c1502edf19c7aa58460dec70d55040842dee0c
parent14f339894db6ca7fe4772d5528c726694d2517c4
c++: constrained partial spec using qualified name [PR92944, PR103678]

In the nested_name_specifier branch within cp_parser_class_head, we need
to update 'type' with the result of maybe_process_partial_specialization
like we do in the template_id_p branch.

PR c++/92944
PR c++/103678

gcc/cp/ChangeLog:

* parser.cc (cp_parser_class_head): Update 'type' with the result
of maybe_process_partial_specialization in the
nested_name_specifier branch.  Refactor nearby code to accomodate
that maybe_process_partial_specialization returns a _TYPE, not a
TYPE_DECL, and eliminate local variable 'class_type' in passing.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-partial-spec10.C: New test.
* g++.dg/cpp2a/concepts-partial-spec11.C: New test.
gcc/cp/parser.cc
gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec11.C [new file with mode: 0644]