mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
c29d55234e3577021b7dabb623e69732fb1407ce
After the previous patch, we now only have two tsubst entry points for expression trees: tsubst_copy_and_build and tsubst_expr. The former despite its unwieldy name is the main entry point, and the latter is just a superset of the former that also handles statement trees. We could merge them so that we just have tsubst_expr, but it seems natural to distinguish statement trees from expression trees and to maintain a separate entry point for them. To that end, this this patch renames tsubst_copy_and_build to tsubst_expr, and renames the current tsubst_expr to tsubst_stmt, which continues to be a superset of the former (which is convenient since sometimes expression trees appear in statement contexts, e.g. a branch of an IF_STMT could be NOP_EXPR). (Making tsubst_stmt disjoint from tsubst_expr is left as future work if deemed desirable.) This patch in turn renames suitable existing uses of tsubst_expr (that expect to take statement trees) to use tsubst_stmt. Thus untouched tsubst_expr calls are implicitly strengthened to expect only expression trees after this patch. For the tsubst_omp_* routines I opted to rename all existing uses to ensure no unintended functional change. This patch also moves the handling of CO_YIELD_EXPR and CO_AWAIT_EXPR from tsubst_stmt to tsubst_expr since they're indeed expression trees. gcc/cp/ChangeLog: * cp-lang.cc (objcp_tsubst_copy_and_build): Rename to ... (objcp_tsubst_expr): ... this. * cp-objcp-common.h (objcp_tsubst_copy_and_build): Rename to ... (objcp_tsubst_expr): ... this. * cp-tree.h (tsubst_copy_and_build): Remove declaration. * init.cc (maybe_instantiate_nsdmi_init): Use tsubst_expr instead of tsubst_copy_and_build. * pt.cc (expand_integer_pack): Likewise. (instantiate_non_dependent_expr_internal): Likewise. (instantiate_class_template): Use tsubst_stmt instead of tsubst_expr for STATIC_ASSERT. (tsubst_function_decl): Adjust tsubst_copy_and_build uses. (tsubst_arg_types): Likewise. (tsubst_exception_specification): Likewise. (tsubst_tree_list): Likewise. (tsubst): Likewise. (tsubst_name): Likewise. (tsubst_omp_clause_decl): Use tsubst_stmt instead of tsubst_expr. (tsubst_omp_clauses): Likewise. (tsubst_copy_asm_operands): Adjust tsubst_copy_and_build use. (tsubst_omp_for_iterator): Use tsubst_stmt instead of tsubst_expr. (tsubst_expr): Rename to ... (tsubst_stmt): ... this. <case CO_YIELD_EXPR, CO_AWAIT_EXPR>: Move to tsubst_expr. (tsubst_omp_udr): Use tsubst_stmt instead of tsubst_expr. (tsubst_non_call_postfix_expression): Adjust tsubst_copy_and_build use. (tsubst_lambda_expr): Likewise. Use tsubst_stmt instead of tsubst_expr for the body of a lambda. (tsubst_copy_and_build_call_args): Rename to ... (tsubst_call_args): ... this. Adjust tsubst_copy_and_build use. (tsubst_copy_and_build): Rename to tsubst_expr. Adjust tsubst_copy_and_build and tsubst_copy_and_build_call_args use. <case TRANSACTION_EXPR>: Use tsubst_stmt instead of tsubst_expr. (maybe_instantiate_noexcept): Adjust tsubst_copy_and_build use. (instantiate_body): Use tsubst_stmt instead of tsubst_expr for substituting the function body. (tsubst_initializer_list): Adjust tsubst_copy_and_build use. gcc/objcp/ChangeLog: * objcp-lang.cc (objcp_tsubst_copy_and_build): Rename to ... (objcp_tsubst_expr): ... this. Adjust tsubst_copy_and_build uses. Reviewed-by: Jason Merrill <jason@redhat.com>
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
30.8%
C
30.2%
Ada
14.4%
D
6.1%
Go
5.7%
Other
12.3%