constexpr.c
224 KB
-
PR c++/79592 - missing explanation of invalid constexpr. · 4f05d85a
We changed months back to use the pre-generic form for constexpr evaluation, but explain_invalid_constexpr_fn was still using DECL_SAVED_TREE. This mostly works, but misses some issues due to folding. So with this patch we save the pre-generic form of constexpr functions even when we know they can't produce a constant result. * constexpr.c (register_constexpr_fundef): Do store the body of a template instantiation that is not potentially constant. (explain_invalid_constexpr_fn): Look it up. (cxx_eval_call_expression): Check fundef->result. From-SVN: r279473
Jason Merrill committed