c++: *this folding in constexpr call
commit1189c03859cefef4fc4fd44d57eb3d4d3348b562
authorJason Merrill <jason@redhat.com>
Fri, 20 May 2022 17:32:10 +0000 (20 13:32 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 24 May 2022 19:52:03 +0000 (24 15:52 -0400)
tree9edd7b5a787308e833080d55506efb3d18a86dc3
parent0aee03cb638c262846f55477b40828f694c846a0
c++: *this folding in constexpr call

The code in cxx_eval_call_expression to fold *this was doing the wrong thing
for array decay; we can use cxx_fold_indirect_ref instead.

gcc/cp/ChangeLog:

* constexpr.cc (cxx_fold_indirect_ref): Add default arg.
(cxx_eval_call_expression): Call it.
(cxx_fold_indirect_ref_1): Handle null empty_base.
gcc/cp/constexpr.cc