PR c++/92105 - decltype(decltype) error cascade.
authorJason Merrill <jason@redhat.com>
Wed, 11 Dec 2019 16:51:14 +0000 (11:51 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 11 Dec 2019 16:51:14 +0000 (11:51 -0500)
commit7ae01728007dcfcdec117706191adeb922cf7b76
treec7f78a1d65960375235d14476bfb315fee35b9af
parent0e5def817a5142dd3eeb91ce4acf9ea22a43ad94
PR c++/92105 - decltype(decltype) error cascade.

The primary change here is to do the CPP_DECLTYPE replacement even when we
get an error, so we don't keep trying and giving the same parse error each
time.  We also commit to the tentative firewall parse more often, leading to
better diagnostics.

* parser.c (cp_parser_decltype_expr): Don't tentative_firewall here.
(cp_parser_decltype): Do it here.  Remember a non-tentative error.

From-SVN: r279237
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/g++.dg/cpp0x/decltype-err1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/decltype10.C