aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2021-03-11 14:01:52 -0500
committerMarek Polacek <polacek@redhat.com>2021-05-18 16:29:46 -0400
commitfef7c8990da15493110118554adfc9a0b779604c (patch)
tree2d8117698161e39c8963a53fc91b69da5fc737a4 /gcc/cp/lambda.c
parent8c114759b8c9c9e2ec90b82d92a24b5a71647017 (diff)
downloadgcc-fef7c8990da15493110118554adfc9a0b779604c.zip
gcc-fef7c8990da15493110118554adfc9a0b779604c.tar.gz
gcc-fef7c8990da15493110118554adfc9a0b779604c.tar.bz2
c++: Prune dead functions.
I was looking at the LCOV coverage report for the C++ FE and found a bunch of unused functions that I think we can remove. Obviously, I left alone various dump_* and debug_* routines. I haven't removed cp_build_function_call although it is also currently unused. * lambda_return_type: was used in parser.c in GCC 7, unused since r255950, * classtype_has_non_deleted_copy_ctor: appeared in GCC 10, its usage was removed in c++/95350, * contains_wildcard_p: used in GCC 9, unused since r276764, * get_template_head_requirements: seems to never have been used, * check_constrained_friend: seems to never have been used, * subsumes_constraints: unused since r276764, * push_void_library_fn: usage removed in r248328, * get_template_parms_at_level: unused since r157857, * get_pattern_parm: unused since r275387. (Some of the seemingly unused functions, such as set_global_friend, are actually used in libcc1.) gcc/cp/ChangeLog: * class.c (classtype_has_non_deleted_copy_ctor): Remove. * constraint.cc (contains_wildcard_p): Likewise. (get_template_head_requirements): Likewise. (check_constrained_friend): Likewise. (subsumes_constraints): Likewise. * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise. (push_void_library_fn): Likewise. (get_pattern_parm): Likewise. (get_template_parms_at_level): Likewise. (lambda_return_type): Likewise. (get_template_head_requirements): Likewise. (check_constrained_friend): Likewise. (subsumes_constraints): Likewise. * decl.c (push_void_library_fn): Likewise. * lambda.c (lambda_return_type): Likewise. * pt.c (get_template_parms_at_level): Likewise. (get_pattern_parm): Likewise.
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 16e2b4c..4a1e090 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -160,24 +160,6 @@ begin_lambda_type (tree lambda)
return type;
}
-/* Returns the type to use for the return type of the operator() of a
- closure class. */
-
-tree
-lambda_return_type (tree expr)
-{
- if (expr == NULL_TREE)
- return void_type_node;
- if (type_unknown_p (expr)
- || BRACE_ENCLOSED_INITIALIZER_P (expr))
- {
- cxx_incomplete_type_error (expr, TREE_TYPE (expr));
- return error_mark_node;
- }
- gcc_checking_assert (!type_dependent_expression_p (expr));
- return cv_unqualified (type_decays_to (unlowered_expr_type (expr)));
-}
-
/* Given a LAMBDA_EXPR or closure type LAMBDA, return the op() of the
closure type. */