Instantiate default arguments/member initializers once.
authorJason Merrill <jason@redhat.com>
Tue, 29 Aug 2017 19:40:08 +0000 (15:40 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 29 Aug 2017 19:40:08 +0000 (15:40 -0400)
commit12659e10c78200717fc82ed77892de5059fa44b5
treec3ed1339329a54953fe39b9f37ba918d7b6880c7
parent1aeafba210c4796bde79d4d06e05c96a153b8fb5
Instantiate default arguments/member initializers once.

* init.c (get_nsdmi): Remember NSDMI instantiations.
* parser.c (inject_this_parameter): Be more picky about
current_class_ptr.
* pt.c (tsubst_copy): Simplify 'this' handling.
(tsubst_default_argument): Remember default argument
instantiations.  Take parameter number.
(tsubst_default_arguments): Pass it.
* call.c (convert_default_arg): Likewise.

From-SVN: r251422
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/init.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-62155.C
gcc/testsuite/g++.dg/cpp1z/direct-enum-init1.C