PR c++/77337 - auto return and lambda
authorJason Merrill <jason@redhat.com>
Thu, 10 Nov 2016 21:42:36 +0000 (16:42 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 10 Nov 2016 21:42:36 +0000 (16:42 -0500)
commitf065303fcf9aa29bf376cf9db985b81d338d7709
tree22f95d301fd585185ceb5330742ed82e7eb9e125
parent28d1bf44643294ccac3c609104ad06b567b44149
PR c++/77337 - auto return and lambda

* pt.c (tsubst_friend_function): Don't set DECL_INITIAL.
(instantiate_decl): It's OK to defer a constexpr function.
* cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): Check
DECL_LANG_SPECIFIC.
* decl2.c (decl_defined_p): Use it.  No longer static.
* decl.c (redeclaration_error_message): Use decl_defined_p.
* constexpr.c (cxx_eval_call_expression): Set input_location around
call to instantiate_decl.

From-SVN: r242056
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1y/auto-fn33.C [new file with mode: 0644]