diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-11-15 16:16:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-15 16:16:01 +0000 |
commit | 4c565999541c60ac5d1b5af618963e701b384fdd (patch) | |
tree | fca6e243cd4901ff8847206ab25ebb5dde10bb91 /gcc/rust/backend | |
parent | 815a57351a33491e534cc1b6c6ddfa17eaf2b500 (diff) | |
parent | 9657c328d0cdda49b7985c3ee727781a387e128b (diff) | |
download | gcc-4c565999541c60ac5d1b5af618963e701b384fdd.zip gcc-4c565999541c60ac5d1b5af618963e701b384fdd.tar.gz gcc-4c565999541c60ac5d1b5af618963e701b384fdd.tar.bz2 |
Merge #1635
1635: rust: Remove unused variables and fix dangling references r=CohenArthur a=CohenArthur
This should make the bootstrap build green again.
This commit contains some aggressive refactoring which either removes unused arguments altogether or removes the argument name in some cases where it might get used later on or cannot change due to implementing a virtual method or something like that.
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r-- | gcc/rust/backend/rust-compile-base.cc | 4 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-base.h | 6 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.cc | 61 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.h | 13 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-fnparam.cc | 2 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-implitem.h | 2 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-intrinsic.cc | 2 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-pattern.cc | 2 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-resolve-path.cc | 12 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-resolve-path.h | 3 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-type.cc | 8 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile.cc | 12 | ||||
-rw-r--r-- | gcc/rust/backend/rust-constexpr.cc | 6 | ||||
-rw-r--r-- | gcc/rust/backend/rust-tree.cc | 38 |
14 files changed, 67 insertions, 104 deletions
diff --git a/gcc/rust/backend/rust-compile-base.cc b/gcc/rust/backend/rust-compile-base.cc index a5643d2..54f7a7d 100644 --- a/gcc/rust/backend/rust-compile-base.cc +++ b/gcc/rust/backend/rust-compile-base.cc @@ -354,7 +354,7 @@ HIRCompileBase::setup_abi_options (tree fndecl, ABI abi) // it is fine to use ARRAY_REFs for vector subscripts on vector // register variables. bool -HIRCompileBase::mark_addressable (tree exp, Location locus) +HIRCompileBase::mark_addressable (tree exp) { tree x = exp; @@ -418,7 +418,7 @@ HIRCompileBase::address_expression (tree expr, Location location) if (expr == error_mark_node) return error_mark_node; - if (!mark_addressable (expr, location)) + if (!mark_addressable (expr)) return error_mark_node; return build_fold_addr_expr_loc (location.gcc_location (), expr); diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h index 4c20933..0dd2549 100644 --- a/gcc/rust/backend/rust-compile-base.h +++ b/gcc/rust/backend/rust-compile-base.h @@ -55,7 +55,7 @@ protected: const TyTy::TypeBoundPredicate *predicate, std::vector<std::pair<Resolver::TraitReference *, HIR::ImplBlock *>> &receiver_bounds, - const TyTy::BaseType *receiver, const TyTy::BaseType *root, Location locus); + const TyTy::BaseType *root, Location locus); bool verify_array_capacities (tree ltype, tree rtype, Location ltype_locus, Location rtype_locus); @@ -63,7 +63,7 @@ protected: tree query_compile (HirId ref, TyTy::BaseType *lookup, const HIR::PathIdentSegment &final_segment, const Analysis::NodeMapping &mappings, - Location expr_locus, bool is_qualified_path); + Location expr_locus); tree resolve_adjustements (std::vector<Resolver::Adjustment> &adjustments, tree expression, Location locus); @@ -113,7 +113,7 @@ protected: static tree indirect_expression (tree expr, Location locus); - static bool mark_addressable (tree, Location); + static bool mark_addressable (tree); static std::vector<Bvariable *> compile_locals_for_block (Context *ctx, Resolver::Rib &rib, tree fndecl); diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc index b077a12..87794cd 100644 --- a/gcc/rust/backend/rust-compile-expr.cc +++ b/gcc/rust/backend/rust-compile-expr.cc @@ -1814,17 +1814,15 @@ CompileExpr::visit (HIR::MethodCallExpr &expr) fn_expr = get_fn_addr_from_dyn (dyn, receiver, fntype, self, expr.get_locus ()); - self = get_receiver_from_dyn (dyn, receiver, fntype, self, - expr.get_locus ()); + self = get_receiver_from_dyn (receiver, self, expr.get_locus ()); } else { // lookup compiled functions since it may have already been compiled HIR::PathExprSegment method_name = expr.get_method_name (); HIR::PathIdentSegment segment_name = method_name.get_segment (); - fn_expr - = resolve_method_address (fntype, ref, receiver, segment_name, - expr.get_mappings (), expr.get_locus ()); + fn_expr = resolve_method_address (fntype, ref, receiver, segment_name, + expr.get_locus ()); } // lookup the autoderef mappings @@ -1925,9 +1923,7 @@ CompileExpr::get_fn_addr_from_dyn (const TyTy::DynamicObjectType *dyn, } tree -CompileExpr::get_receiver_from_dyn (const TyTy::DynamicObjectType *dyn, - TyTy::BaseType *receiver, - TyTy::FnType *fntype, tree receiver_ref, +CompileExpr::get_receiver_from_dyn (TyTy::BaseType *receiver, tree receiver_ref, Location expr_locus) { // get any indirection sorted out @@ -1946,7 +1942,6 @@ tree CompileExpr::resolve_method_address (TyTy::FnType *fntype, HirId ref, TyTy::BaseType *receiver, HIR::PathIdentSegment &segment, - Analysis::NodeMapping expr_mappings, Location expr_locus) { // lookup compiled functions since it may have already been compiled @@ -2016,7 +2011,7 @@ CompileExpr::resolve_method_address (TyTy::FnType *fntype, HirId ref, // implementation and we should just return error_mark_node rust_assert (candidates.size () == 1); - auto &candidate = *candidates.begin (); + auto candidate = *candidates.begin (); rust_assert (candidate.is_impl_candidate ()); rust_assert (candidate.ty->get_kind () == TyTy::TypeKind::FNDEF); TyTy::FnType *candidate_call = static_cast<TyTy::FnType *> (candidate.ty); @@ -2040,7 +2035,8 @@ CompileExpr::resolve_method_address (TyTy::FnType *fntype, HirId ref, tree CompileExpr::resolve_operator_overload ( Analysis::RustLangItem::ItemType lang_item_type, HIR::OperatorExprMeta expr, - tree lhs, tree rhs, HIR::Expr *lhs_expr, HIR::Expr *rhs_expr) + tree lhs, tree rhs, HIR::Expr *lhs_expr, + HIR::Expr * /* rhs_expr // FIXME: Reuse when needed */) { TyTy::FnType *fntype; bool is_op_overload = ctx->get_tyctx ()->lookup_operator_overload ( @@ -2073,9 +2069,8 @@ CompileExpr::resolve_operator_overload ( // lookup compiled functions since it may have already been compiled HIR::PathIdentSegment segment_name ( Analysis::RustLangItem::ToString (lang_item_type)); - tree fn_expr - = resolve_method_address (fntype, ref, receiver, segment_name, - expr.get_mappings (), expr.get_locus ()); + tree fn_expr = resolve_method_address (fntype, ref, receiver, segment_name, + expr.get_locus ()); // lookup the autoderef mappings std::vector<Resolver::Adjustment> *adjustments = nullptr; @@ -2096,8 +2091,9 @@ CompileExpr::resolve_operator_overload ( } tree -CompileExpr::compile_bool_literal (const HIR::LiteralExpr &expr, - const TyTy::BaseType *tyty) +CompileExpr::compile_bool_literal ( + const HIR::LiteralExpr &expr, + const TyTy::BaseType * /* tyty FIXME: Reuse when needed */) { rust_assert (expr.get_lit_type () == HIR::Literal::BOOL); @@ -2179,8 +2175,9 @@ CompileExpr::compile_float_literal (const HIR::LiteralExpr &expr, } tree -CompileExpr::compile_char_literal (const HIR::LiteralExpr &expr, - const TyTy::BaseType *tyty) +CompileExpr::compile_char_literal ( + const HIR::LiteralExpr &expr, + const TyTy::BaseType * /* tyty FIXME: Reuse when needed */) { rust_assert (expr.get_lit_type () == HIR::Literal::CHAR); const auto literal_value = expr.get_literal (); @@ -2359,8 +2356,6 @@ CompileExpr::visit (HIR::ArrayExpr &expr) } rust_assert (tyty->get_kind () == TyTy::TypeKind::ARRAY); - const TyTy::ArrayType &array_tyty - = static_cast<const TyTy::ArrayType &> (*tyty); HIR::ArrayElems &elements = *expr.get_internal_elements (); switch (elements.get_array_expr_type ()) @@ -2368,23 +2363,20 @@ CompileExpr::visit (HIR::ArrayExpr &expr) case HIR::ArrayElems::ArrayExprType::VALUES: { HIR::ArrayElemsValues &elems = static_cast<HIR::ArrayElemsValues &> (elements); - translated - = array_value_expr (expr.get_locus (), array_tyty, array_type, elems); + translated = array_value_expr (expr.get_locus (), array_type, elems); } return; case HIR::ArrayElems::ArrayExprType::COPIED: HIR::ArrayElemsCopied &elems = static_cast<HIR::ArrayElemsCopied &> (elements); - translated - = array_copied_expr (expr.get_locus (), array_tyty, array_type, elems); + translated = array_copied_expr (expr.get_locus (), array_type, elems); } } tree -CompileExpr::array_value_expr (Location expr_locus, - const TyTy::ArrayType &array_tyty, - tree array_type, HIR::ArrayElemsValues &elems) +CompileExpr::array_value_expr (Location expr_locus, tree array_type, + HIR::ArrayElemsValues &elems) { std::vector<unsigned long> indexes; std::vector<tree> constructor; @@ -2402,9 +2394,8 @@ CompileExpr::array_value_expr (Location expr_locus, } tree -CompileExpr::array_copied_expr (Location expr_locus, - const TyTy::ArrayType &array_tyty, - tree array_type, HIR::ArrayElemsCopied &elems) +CompileExpr::array_copied_expr (Location expr_locus, tree array_type, + HIR::ArrayElemsCopied &elems) { // see gcc/cp/typeck2.cc:1369-1401 gcc_assert (TREE_CODE (array_type) == ARRAY_TYPE); @@ -2566,7 +2557,8 @@ HIRCompileBase::resolve_deref_adjustment (Resolver::Adjustment &adjustment, tree HIRCompileBase::resolve_indirection_adjustment ( - Resolver::Adjustment &adjustment, tree expression, Location locus) + Resolver::Adjustment & /* adjustment FIXME: Reuse when needed */, + tree expression, Location locus) { return indirect_expression (expression, locus); } @@ -2979,14 +2971,13 @@ CompileExpr::generate_closure_function (HIR::ClosureExpr &expr, } tree -CompileExpr::generate_closure_fntype (HIR::ClosureExpr &expr, +CompileExpr::generate_closure_fntype (HIR::ClosureExpr &, const TyTy::ClosureType &closure_tyty, - tree compiled_closure_tyty, - TyTy::FnType **fn_tyty) + tree, TyTy::FnType **fn_tyty) { // grab the specified_bound rust_assert (closure_tyty.num_specified_bounds () == 1); - const TyTy::TypeBoundPredicate &predicate + const TyTy::TypeBoundPredicate predicate = *closure_tyty.get_specified_bounds ().begin (); // ensure the fn_once_output associated type is set diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index a259daf..98d322a 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -97,14 +97,12 @@ protected: TyTy::BaseType *receiver, TyTy::FnType *fntype, tree receiver_ref, Location expr_locus); - tree get_receiver_from_dyn (const TyTy::DynamicObjectType *dyn, - TyTy::BaseType *receiver, TyTy::FnType *fntype, - tree receiver_ref, Location expr_locus); + tree get_receiver_from_dyn (TyTy::BaseType *receiver, tree receiver_ref, + Location expr_locus); tree resolve_method_address (TyTy::FnType *fntype, HirId ref, TyTy::BaseType *receiver, HIR::PathIdentSegment &segment, - Analysis::NodeMapping expr_mappings, Location expr_locus); tree @@ -135,11 +133,10 @@ protected: tree type_cast_expression (tree type_to_cast_to, tree expr, Location locus); - tree array_value_expr (Location expr_locus, const TyTy::ArrayType &array_tyty, - tree array_type, HIR::ArrayElemsValues &elems); + tree array_value_expr (Location expr_locus, tree array_type, + HIR::ArrayElemsValues &elems); - tree array_copied_expr (Location expr_locus, - const TyTy::ArrayType &array_tyty, tree array_type, + tree array_copied_expr (Location expr_locus, tree array_type, HIR::ArrayElemsCopied &elems); protected: diff --git a/gcc/rust/backend/rust-compile-fnparam.cc b/gcc/rust/backend/rust-compile-fnparam.cc index 3f0ec82..7a38e76 100644 --- a/gcc/rust/backend/rust-compile-fnparam.cc +++ b/gcc/rust/backend/rust-compile-fnparam.cc @@ -61,7 +61,7 @@ CompileFnParam::visit (HIR::IdentifierPattern &pattern) } void -CompileFnParam::visit (HIR::WildcardPattern &pattern) +CompileFnParam::visit (HIR::WildcardPattern &) { decl_type = ctx->get_backend ()->immutable_type (decl_type); diff --git a/gcc/rust/backend/rust-compile-implitem.h b/gcc/rust/backend/rust-compile-implitem.h index ac9478a..c786fba 100644 --- a/gcc/rust/backend/rust-compile-implitem.h +++ b/gcc/rust/backend/rust-compile-implitem.h @@ -72,7 +72,7 @@ public: void visit (HIR::TraitItemConst &constant) override; void visit (HIR::TraitItemFunc &func) override; - void visit (HIR::TraitItemType &typ) override {} + void visit (HIR::TraitItemType &) override {} private: CompileTraitItem (Context *ctx, TyTy::BaseType *concrete, Location ref_locus) diff --git a/gcc/rust/backend/rust-compile-intrinsic.cc b/gcc/rust/backend/rust-compile-intrinsic.cc index 5522211..977615e 100644 --- a/gcc/rust/backend/rust-compile-intrinsic.cc +++ b/gcc/rust/backend/rust-compile-intrinsic.cc @@ -151,7 +151,7 @@ unchecked_op_handler (tree_code op) } inline tree -sorry_handler (Context *ctx, TyTy::FnType *fntype) +sorry_handler (Context *, TyTy::FnType *fntype) { rust_sorry_at (fntype->get_locus (), "intrinsic %qs is not yet implemented", fntype->get_identifier ().c_str ()); diff --git a/gcc/rust/backend/rust-compile-pattern.cc b/gcc/rust/backend/rust-compile-pattern.cc index 1d8eda1..3f9d650 100644 --- a/gcc/rust/backend/rust-compile-pattern.cc +++ b/gcc/rust/backend/rust-compile-pattern.cc @@ -71,7 +71,7 @@ CompilePatternCaseLabelExpr::visit (HIR::TupleStructPattern &pattern) } void -CompilePatternCaseLabelExpr::visit (HIR::WildcardPattern &pattern) +CompilePatternCaseLabelExpr::visit (HIR::WildcardPattern &) { // operand 0 being NULL_TREE signifies this is the default case label see: // tree.def for documentation for CASE_LABEL_EXPR diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc index f89da2b..7becdf7 100644 --- a/gcc/rust/backend/rust-compile-resolve-path.cc +++ b/gcc/rust/backend/rust-compile-resolve-path.cc @@ -33,20 +33,20 @@ void ResolvePathRef::visit (HIR::QualifiedPathInExpression &expr) { resolved = resolve (expr.get_final_segment ().get_segment (), - expr.get_mappings (), expr.get_locus (), true); + expr.get_mappings (), expr.get_locus ()); } void ResolvePathRef::visit (HIR::PathInExpression &expr) { resolved = resolve (expr.get_final_segment ().get_segment (), - expr.get_mappings (), expr.get_locus (), false); + expr.get_mappings (), expr.get_locus ()); } tree ResolvePathRef::resolve (const HIR::PathIdentSegment &final_segment, const Analysis::NodeMapping &mappings, - Location expr_locus, bool is_qualified_path) + Location expr_locus) { TyTy::BaseType *lookup = nullptr; bool ok = ctx->get_tyctx ()->lookup_type (mappings.get_hirid (), &lookup); @@ -157,8 +157,8 @@ ResolvePathRef::resolve (const HIR::PathIdentSegment &final_segment, } // let the query system figure it out - tree resolved_item = query_compile (ref, lookup, final_segment, mappings, - expr_locus, is_qualified_path); + tree resolved_item + = query_compile (ref, lookup, final_segment, mappings, expr_locus); if (resolved_item != error_mark_node) { TREE_USED (resolved_item) = 1; @@ -170,7 +170,7 @@ tree HIRCompileBase::query_compile (HirId ref, TyTy::BaseType *lookup, const HIR::PathIdentSegment &final_segment, const Analysis::NodeMapping &mappings, - Location expr_locus, bool is_qualified_path) + Location expr_locus) { HIR::Item *resolved_item = ctx->get_mappings ()->lookup_hir_item (ref); HirId parent_block; diff --git a/gcc/rust/backend/rust-compile-resolve-path.h b/gcc/rust/backend/rust-compile-resolve-path.h index f0360bd..63441b6 100644 --- a/gcc/rust/backend/rust-compile-resolve-path.h +++ b/gcc/rust/backend/rust-compile-resolve-path.h @@ -61,8 +61,7 @@ public: {} tree resolve (const HIR::PathIdentSegment &final_segment, - const Analysis::NodeMapping &mappings, Location locus, - bool is_qualified_path); + const Analysis::NodeMapping &mappings, Location locus); tree resolved; }; diff --git a/gcc/rust/backend/rust-compile-type.cc b/gcc/rust/backend/rust-compile-type.cc index 5e56e0a..8da2839 100644 --- a/gcc/rust/backend/rust-compile-type.cc +++ b/gcc/rust/backend/rust-compile-type.cc @@ -399,7 +399,7 @@ TyTyResolveCompile::visit (const TyTy::SliceType &type) } void -TyTyResolveCompile::visit (const TyTy::BoolType &type) +TyTyResolveCompile::visit (const TyTy::BoolType &) { translated = ctx->get_backend ()->named_type ("bool", @@ -503,7 +503,7 @@ TyTyResolveCompile::visit (const TyTy::FloatType &type) } void -TyTyResolveCompile::visit (const TyTy::USizeType &type) +TyTyResolveCompile::visit (const TyTy::USizeType &) { translated = ctx->get_backend ()->named_type ( "usize", @@ -513,7 +513,7 @@ TyTyResolveCompile::visit (const TyTy::USizeType &type) } void -TyTyResolveCompile::visit (const TyTy::ISizeType &type) +TyTyResolveCompile::visit (const TyTy::ISizeType &) { translated = ctx->get_backend ()->named_type ( "isize", @@ -523,7 +523,7 @@ TyTyResolveCompile::visit (const TyTy::ISizeType &type) } void -TyTyResolveCompile::visit (const TyTy::CharType &type) +TyTyResolveCompile::visit (const TyTy::CharType &) { translated = ctx->get_backend ()->named_type ("char", diff --git a/gcc/rust/backend/rust-compile.cc b/gcc/rust/backend/rust-compile.cc index 0c72a16..1f97ad1 100644 --- a/gcc/rust/backend/rust-compile.cc +++ b/gcc/rust/backend/rust-compile.cc @@ -214,7 +214,7 @@ HIRCompileBase::coerce_to_dyn_object (tree compiled_ref, auto address = compute_address_for_trait_item (item, predicate, probed_bounds_for_receiver, - actual, actual, locus); + actual, locus); vtable_ctor_elems.push_back (address); vtable_ctor_idx.push_back (i++); } @@ -233,7 +233,7 @@ HIRCompileBase::compute_address_for_trait_item ( const TyTy::TypeBoundPredicate *predicate, std::vector<std::pair<Resolver::TraitReference *, HIR::ImplBlock *>> &receiver_bounds, - const TyTy::BaseType *receiver, const TyTy::BaseType *root, Location locus) + const TyTy::BaseType *root, Location locus) { // There are two cases here one where its an item which has an implementation // within a trait-impl-block. Then there is the case where there is a default @@ -360,9 +360,11 @@ HIRCompileBase::compute_address_for_trait_item ( } bool -HIRCompileBase::verify_array_capacities (tree ltype, tree rtype, - Location lvalue_locus, - Location rvalue_locus) +HIRCompileBase::verify_array_capacities ( + tree ltype, tree rtype, + // TODO: Reuse `lvalue_locus` when we want to switch to a RichLocation and + // point to the + Location /* lvalue_locus */, Location rvalue_locus) { rust_assert (ltype != NULL_TREE); rust_assert (rtype != NULL_TREE); diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc index 21e8bed..4586110 100644 --- a/gcc/rust/backend/rust-constexpr.cc +++ b/gcc/rust/backend/rust-constexpr.cc @@ -3996,8 +3996,7 @@ constexpr_fn_retval (const constexpr_ctx *ctx, tree body) // return an aggregate constant. If UNSHARE_P, return an unshared // copy of the initializer. static tree -constant_value_1 (tree decl, bool strict_p, bool return_aggregate_cst_ok_p, - bool unshare_p) +constant_value_1 (tree decl, bool, bool, bool unshare_p) { while (TREE_CODE (decl) == CONST_DECL) { @@ -6486,8 +6485,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, /* Like maybe_constant_init but first fully instantiate the argument. */ tree -fold_non_dependent_init (tree t, - tsubst_flags_t complain /*=tf_warning_or_error*/, +fold_non_dependent_init (tree t, tsubst_flags_t /*=tf_warning_or_error*/, bool manifestly_const_eval /*=false*/, tree object /* = NULL_TREE */) { diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc index 0c393d9..fb6ff0f 100644 --- a/gcc/rust/backend/rust-tree.cc +++ b/gcc/rust/backend/rust-tree.cc @@ -2059,11 +2059,7 @@ rs_tree_equal (tree t1, tree t2) /* TRUE iff TYPE is publicly & uniquely derived from PARENT. */ -bool -publicly_uniquely_derived_p (tree parent, tree type) -{ - return false; -} +bool publicly_uniquely_derived_p (tree, tree) { return false; } // forked from gcc/cp/typeck.cc comp_except_types @@ -3343,11 +3339,7 @@ release_tree_vector (vec<tree, va_gc> *vec) /* As above, but also check value-dependence of the expression as a whole. */ -bool -instantiation_dependent_expression_p (tree expression) -{ - return false; -} +bool instantiation_dependent_expression_p (tree) { return false; } // forked from gcc/cp/cvt.cc cp_get_callee @@ -3397,11 +3389,7 @@ scalarish_type_p (const_tree t) constructors are deleted. This function implements the ABI notion of non-trivial copy, which has diverged from the one in the standard. */ -bool -type_has_nontrivial_copy_init (const_tree type) -{ - return false; -} +bool type_has_nontrivial_copy_init (const_tree) { return false; } // forked from gcc/cp/tree.cc build_local_temp @@ -3424,11 +3412,7 @@ build_local_temp (tree type) /* Returns true iff DECL is a capture proxy for a normal capture (i.e. without explicit initializer). */ -bool -is_normal_capture_proxy (tree decl) -{ - return false; -} +bool is_normal_capture_proxy (tree) { return false; } // forked from gcc/cp/c-common.cc reject_gcc_builtin @@ -3693,7 +3677,7 @@ char_type_p (tree type) lvalue for the function template specialization. */ tree -resolve_nondeduced_context (tree orig_expr, tsubst_flags_t complain) +resolve_nondeduced_context (tree orig_expr, tsubst_flags_t) { return orig_expr; } @@ -3972,21 +3956,13 @@ decl_constant_var_p (tree decl) /* Returns true iff DECL is a variable or function declared with an auto type that has not yet been deduced to a real type. */ -bool -undeduced_auto_decl (tree decl) -{ - return false; -} +bool undeduced_auto_decl (tree) { return false; } // forked from gcc/cp/decl.cc require_deduced_type /* Complain if DECL has an undeduced return type. */ -bool -require_deduced_type (tree decl, tsubst_flags_t complain) -{ - return true; -} +bool require_deduced_type (tree, tsubst_flags_t) { return true; } /* Return the location of a tree passed to %+ formats. */ |