-/* Simplify EXPR if it is a non-dependent expression. Returns the
- (possibly simplified) expression. */
-
-static tree
-cp_parser_fold_non_dependent_expr (tree expr)
-{
- /* If we're in a template, but EXPR isn't value dependent, simplify
- it. We're supposed to treat:
-
- template <typename T> void f(T[1 + 1]);
- template <typename T> void f(T[2]);
-
- as two declarations of the same function, for example. */
- if (processing_template_decl
- && !type_dependent_expression_p (expr)
- && !value_dependent_expression_p (expr))
- {
- HOST_WIDE_INT saved_processing_template_decl;
-
- saved_processing_template_decl = processing_template_decl;
- processing_template_decl = 0;
- expr = tsubst_copy_and_build (expr,
- /*args=*/NULL_TREE,
- tf_error,
- /*in_decl=*/NULL_TREE,
- /*function_p=*/false);
- processing_template_decl = saved_processing_template_decl;
- }
- return expr;
-}
-