PR c++/77337 - auto return and lambda
commit31db86df8fa1d3248c97de6c47dbd76fb74eaa8e
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Nov 2016 21:42:36 +0000 (10 21:42 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Nov 2016 21:42:36 +0000 (10 21:42 +0000)
tree22f95d301fd585185ceb5330742ed82e7eb9e125
parentf9d79f1857fef198c52f0224eeb4380566844aad
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242056 138bc75d-0d04-0410-961f-82ee72b054a4
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]