c++: remove i_c_e_p parm from tsubst_copy_and_build
It seems the only and original purpose of tsubst_copy_and_build's
integral_constant_expression_p boolean parameter (added in r116276, which
predates the constexpr machinery) is to diagnose certain constructs that
aren't allowed to appear in a C++98 integral constant expression
context, specifically casts to a non-integral type (diagnosed from the
*_CAST_EXPR case of tsubst_copy_and_build) or dependent names that
resolve to a non-constant decl (diagnosed from the IDENTIFIER_NODE case
of tsubst_copy_and_build). The parameter has no effect outside of C++98
AFAICT.
But diagnosing such constructs should arguably be the job of the constexpr
machinery (e.g. is_constant_expression) after substitution, and doing it
during substitution by way of an additional parameter complicates the
API of this workhorse function for what amounts to a couple of archaic
C++98 restrictions. And it seems is_constant_expression already does a
good job of diagnosing the aforementioned two constructs in C++98 mode,
at least as far as our testsuite is concerned.
So this patch removes this parameter from tsubst_copy_and_build,
tsubst_expr and tsubst_copy_and_build_call_args. The only interesting
changes are to potential_constant_expression_1 and the IDENTIFIER_NODE
and *_CAST_EXPR cases of tsubst_copy_and_build; the rest are mechanical
adjustments to the functions' signatures and their call sites.