PR c++/81236 - ICE with template-id in generic lambda
authorJason Merrill <jason@redhat.com>
Tue, 29 Aug 2017 21:38:21 +0000 (17:38 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 29 Aug 2017 21:38:21 +0000 (17:38 -0400)
commit88b811bd29063036fd4536ee1312b1269cade6ed
treee1ea3e04489af6dd429b46ac2e60b64c29ffcb12
parent888a9854256974585874eb982fceda24cd7842d3
PR c++/81236 - ICE with template-id in generic lambda

* semantics.c (finish_id_expression): Remove special dependent case.
Avoid some later pieces when dependent.
(finish_qualified_id_expr): Do normal BASELINK handling in a
template.  Always build a SCOPE_REF for a destructor BIT_NOT_EXPR.
(parsing_default_capturing_generic_lambda_in_template): Remove.
* parser.c (cp_parser_postfix_dot_deref_expression): Always give an
error for types that will never be complete.
* mangle.c (write_expression): Add sanity check.
* tree.c (build_qualified_name): Add sanity check.
(cp_walk_subtrees): Walk into the class context of a BASELINK.
* lambda.c (add_capture): Improve diagnostic for generic lambda
capture failure.
* call.c (build_new_method_call_1): Print the right constructor
name.

From-SVN: r251438
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/lambda.c
gcc/cp/mangle.c
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/testsuite/g++.dg/cpp1y/lambda-generic-this1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/lambda-generic-this1a.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/pseudodtor3.C