PR c++/81359 - Unparsed NSDMI error from SFINAE context.
authorJason Merrill <jason@redhat.com>
Wed, 9 Aug 2017 18:32:02 +0000 (14:32 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 9 Aug 2017 18:32:02 +0000 (14:32 -0400)
commit9fb82e652cee118b5c9d77e1e60a351a37a55dc8
tree1ff0784160f8c2d88777310405e7581704bfedb3
parent04d07b61cb80fd97e98eb39451ff6a8675a63d90
PR c++/81359 - Unparsed NSDMI error from SFINAE context.

* init.c (get_nsdmi): Add complain parm.
* typeck2.c (digest_nsdmi_init): Add complain parm.
(process_init_constructor_record): Pass complain to get_nsdmi.
* pt.c (maybe_instantiate_noexcept): Add complain parm, return bool.
* method.c (get_defaulted_eh_spec): Add complain parm.  Pass it into
synthesized_method_walk.
(synthesized_method_walk): Adjust.
(walk_field_subobs): Pass complain to get_nsdmi.
(defaulted_late_check): Skip other checks if deleted.
* decl2.c (mark_used): Pass complain to maybe_instantiate_noexcept.
* call.c (build_aggr_conv): Pass complain to get_nsdmi.
* parser.c (defarg_location): New.
* error.c (location_of): Use it.

From-SVN: r250994
15 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/error.c
gcc/cp/init.c
gcc/cp/method.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C
gcc/testsuite/g++.dg/cpp0x/nsdmi-template14.C
gcc/testsuite/g++.dg/cpp0x/nsdmi10.C
gcc/testsuite/g++.dg/cpp0x/sfinae59.C [new file with mode: 0644]