PR c++/80935 - wrong C++17 error with lambda
commitb7e4a5588b793e8429eacf0fd0cb954a7c39003c
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Aug 2017 19:51:30 +0000 (29 19:51 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Aug 2017 19:51:30 +0000 (29 19:51 +0000)
tree8d60fba745a9b87bc0bf687a4dca57ccb6d2fd9a
parent1dcd84cf006a895316f89eacd5fe0d13f998e575
PR c++/80935 - wrong C++17 error with lambda

* decl.c (check_for_uninitialized_const_var): Check
is_instantiation_of_constexpr.
* constexpr.c (ensure_literal_type_for_constexpr_object): Check
is_instantiation_of_constexpr.
(potential_constant_expression_1): Check var_in_maybe_constexpr_fn.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251429 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/decl.c
gcc/testsuite/g++.dg/cpp1z/constexpr-lambda16.C [new file with mode: 0644]