c++: parse trivial DMI immediately [PR96645]
The recent change to reject __is_constructible for nested classes with DMI
is, unsurprisingly, breaking some code. Let's allow simple cases by
immediately parsing DMI that do no name lookup; then being in complete class
scope makes no difference.
PR c++/96645
gcc/cp/ChangeLog:
* parser.cc (cp_parser_early_parsing_nsdmi): New.
(cp_parser_member_declaration): Call it.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/nsdmi10.C: Now OK.
* g++.dg/ext/is_constructible3.C: Likewise.
* g++.dg/ext/is_constructible7.C: Likewise.