]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/cp-tree.h
Update copyright years.
[thirdparty/gcc.git] / gcc / cp / cp-tree.h
index 7e0c41c222e267f23474ec7d71f437111cb6edbf..495ed6b9f56e7c6ee7555055b0d327094c9aaa3d 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for C++ parsing and type checking.
-   Copyright (C) 1987-2019 Free Software Foundation, Inc.
+   Copyright (C) 1987-2020 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
@@ -204,6 +204,8 @@ enum cp_tree_index
 
     CPTI_ANY_TARG,
 
+    CPTI_SOURCE_LOCATION_IMPL,
+
     CPTI_MAX
 };
 
@@ -270,9 +272,6 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
    then deletes the entire object.  */
 #define deleting_dtor_identifier       cp_global_trees[CPTI_DELETING_DTOR_IDENTIFIER]
 
-#define ovl_op_identifier(ISASS, CODE)  (OVL_OP_INFO(ISASS, CODE)->identifier)
-#define assign_op_identifier (ovl_op_info[true][OVL_OP_NOP_EXPR].identifier)
-#define call_op_identifier (ovl_op_info[false][OVL_OP_CALL_EXPR].identifier)
 /* The name used for conversion operators -- but note that actual
    conversion functions use special identifiers outside the identifier
    table.  */
@@ -359,6 +358,9 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
 /* A node which matches any template argument.  */
 #define any_targ_node                  cp_global_trees[CPTI_ANY_TARG]
 
+/* std::source_location::__impl class.  */
+#define source_location_impl           cp_global_trees[CPTI_SOURCE_LOCATION_IMPL]
+
 /* Node to indicate default access. This must be distinct from the
    access nodes in tree.h.  */
 
@@ -448,6 +450,7 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
       LAMBDA_EXPR_CAPTURE_OPTIMIZED (in LAMBDA_EXPR)
       IMPLICIT_CONV_EXPR_BRACED_INIT (in IMPLICIT_CONV_EXPR)
       TINFO_VAR_DECLARED_CONSTINIT (in TEMPLATE_INFO)
+      CALL_FROM_NEW_OR_DELETE_P (in CALL_EXPR)
    3: (TREE_REFERENCE_EXPR) (in NON_LVALUE_EXPR) (commented-out).
       ICS_BAD_FLAG (in _CONV)
       FN_TRY_BLOCK_P (in TRY_BLOCK)
@@ -2696,7 +2699,9 @@ struct GTY(()) lang_decl_fn {
   unsigned hidden_friend_p : 1;
   unsigned omp_declare_reduction_p : 1;
   unsigned has_dependent_explicit_spec_p : 1;
-  unsigned spare : 12;
+  unsigned immediate_fn_p : 1;
+  unsigned maybe_deleted : 1;
+  unsigned spare : 10;
 
   /* 32-bits padding on 64-bit host.  */
 
@@ -3138,6 +3143,11 @@ struct GTY(()) lang_decl {
 #define DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P(NODE) \
   (LANG_DECL_FN_CHECK (NODE)->has_dependent_explicit_spec_p)
 
+/* Nonzero for a defaulted FUNCTION_DECL for which we haven't decided yet if
+   it's deleted.  */
+#define DECL_MAYBE_DELETED(NODE) \
+  (LANG_DECL_FN_CHECK (NODE)->maybe_deleted)
+
 /* True (in a FUNCTION_DECL) if NODE is a virtual function that is an
    invalid overrider for a function from a base class.  Once we have
    complained about an invalid overrider we avoid complaining about it
@@ -3210,6 +3220,15 @@ struct GTY(()) lang_decl {
 #define DECL_DECLARED_CONSTEXPR_P(DECL) \
   DECL_LANG_FLAG_8 (VAR_OR_FUNCTION_DECL_CHECK (STRIP_TEMPLATE (DECL)))
 
+/* True if FNDECL is an immediate function.  */
+#define DECL_IMMEDIATE_FUNCTION_P(NODE) \
+  (DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (STRIP_TEMPLATE (NODE)))    \
+   ? LANG_DECL_FN_CHECK (NODE)->immediate_fn_p                         \
+   : false)
+#define SET_DECL_IMMEDIATE_FUNCTION_P(NODE) \
+  (retrofit_lang_decl (FUNCTION_DECL_CHECK (NODE)),                    \
+   LANG_DECL_FN_CHECK (NODE)->immediate_fn_p = true)
+
 // True if NODE was declared as 'concept'.  The flag implies that the
 // declaration is constexpr, that the declaration cannot be specialized or
 // refined, and that the result type must be convertible to bool.
@@ -3791,6 +3810,11 @@ struct GTY(()) lang_decl {
    should be performed at instantiation time.  */
 #define KOENIG_LOOKUP_P(NODE) TREE_LANG_FLAG_0 (CALL_EXPR_CHECK (NODE))
 
+/* In a CALL_EXPR, true for allocator calls from new or delete
+   expressions.  */
+#define CALL_FROM_NEW_OR_DELETE_P(NODE) \
+  TREE_LANG_FLAG_2 (CALL_EXPR_CHECK (NODE))
+
 /* True if the arguments to NODE should be evaluated in left-to-right
    order regardless of PUSH_ARGS_REVERSED.  */
 #define CALL_EXPR_ORDERED_ARGS(NODE) \
@@ -4230,9 +4254,9 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
    As an extension, we also treat vectors as aggregates.  Keep these
    checks in ascending code order.  */
 #define CP_AGGREGATE_TYPE_P(TYPE)                              \
-  (TREE_CODE (TYPE) == VECTOR_TYPE                             \
+  (gnu_vector_type_p (TYPE)                                    \
    || TREE_CODE (TYPE) == ARRAY_TYPE                           \
-   || (CLASS_TYPE_P (TYPE) && !CLASSTYPE_NON_AGGREGATE (TYPE)))
+   || (CLASS_TYPE_P (TYPE) && COMPLETE_TYPE_P (TYPE) && !CLASSTYPE_NON_AGGREGATE (TYPE)))
 
 /* Nonzero for a class type means that the class type has a
    user-declared constructor.  */
@@ -4306,6 +4330,11 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
 #define CONSTRUCTOR_IS_DESIGNATED_INIT(NODE) \
   (TREE_LANG_FLAG_6 (CONSTRUCTOR_CHECK (NODE)))
 
+/* True if this CONSTRUCTOR comes from a parenthesized list of values, e.g.
+   A(1, 2, 3).  */
+#define CONSTRUCTOR_IS_PAREN_INIT(NODE) \
+  (CONSTRUCTOR_CHECK(NODE)->base.private_flag)
+
 /* True if NODE represents a conversion for direct-initialization in a
    template.  Set by perform_implicit_conversion_flags.  */
 #define IMPLICIT_CONV_EXPR_DIRECT_INIT(NODE) \
@@ -5190,6 +5219,7 @@ enum special_function_kind {
                              destroyed.  */
   sfk_conversion,         /* A conversion operator.  */
   sfk_deduction_guide,    /* A class template deduction guide.  */
+  sfk_comparison,         /* A comparison operator (e.g. ==, <, <=>).  */
   sfk_virtual_destructor   /* Used by member synthesis fns.  */
 };
 
@@ -5552,6 +5582,19 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, TYPENAME_FLAG };
 #define LOOKUP_ALLOW_FLEXARRAY_INIT (LOOKUP_DELEGATING_CONS << 1)
 /* Require constant initialization of a non-constant variable.  */
 #define LOOKUP_CONSTINIT (LOOKUP_ALLOW_FLEXARRAY_INIT << 1)
+/* We're looking for either a rewritten comparison operator candidate or the
+   operator to use on the former's result.  We distinguish between the two by
+   knowing that comparisons other than == and <=> must be the latter, as must
+   a <=> expression trying to rewrite to <=> without reversing.  */
+#define LOOKUP_REWRITTEN (LOOKUP_CONSTINIT << 1)
+/* Reverse the order of the two arguments for comparison rewriting.  First we
+   swap the arguments in add_operator_candidates, then we swap the conversions
+   in add_candidate (so that they correspond to the original order of the
+   args), then we swap the conversions back in build_new_op_1 (so they
+   correspond to the order of the args in the candidate).  */
+#define LOOKUP_REVERSED (LOOKUP_REWRITTEN << 1)
+/* We're initializing an aggregate from a parenthesized list of values.  */
+#define LOOKUP_AGGREGATE_PAREN_INIT (LOOKUP_REVERSED << 1)
 
 #define LOOKUP_NAMESPACES_ONLY(F)  \
   (((F) & LOOKUP_PREFER_NAMESPACES) && !((F) & LOOKUP_PREFER_TYPES))
@@ -5728,8 +5771,13 @@ enum auto_deduction_context
 
    STF_USER_VISIBLE: use heuristics to try to avoid stripping user-facing
        aliases of internal details.  This is intended for diagnostics,
-       where it should (for example) give more useful "aka" types.  */
+       where it should (for example) give more useful "aka" types.
+
+   STF_STRIP_DEPENDENT: allow the stripping of aliases with dependent
+       template parameters, relying on code elsewhere to report any
+       appropriate diagnostics.  */
 const unsigned int STF_USER_VISIBLE = 1U;
+const unsigned int STF_STRIP_DEPENDENT = 1U << 1;
 
 /* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM
    node.  */
@@ -5800,6 +5848,12 @@ extern GTY(()) unsigned char ovl_op_alternate[OVL_OP_MAX];
 #define IDENTIFIER_OVL_OP_FLAGS(NODE) \
   (IDENTIFIER_OVL_OP_INFO (NODE)->flags)
 
+inline tree ovl_op_identifier (bool isass, tree_code code)
+{ return OVL_OP_INFO(isass, code)->identifier; }
+inline tree ovl_op_identifier (tree_code code) { return ovl_op_identifier (false, code); }
+#define assign_op_identifier (ovl_op_info[true][OVL_OP_NOP_EXPR].identifier)
+#define call_op_identifier (ovl_op_info[false][OVL_OP_CALL_EXPR].identifier)
+
 /* A type-qualifier, or bitmask therefore, using the TYPE_QUAL
    constants.  */
 
@@ -5873,6 +5927,7 @@ enum cp_decl_spec {
   ds_constexpr,
   ds_complex,
   ds_constinit,
+  ds_consteval,
   ds_thread,
   ds_type_spec,
   ds_redefined_builtin_type_spec,
@@ -6132,6 +6187,7 @@ struct GTY((chain_next ("%h.next"))) tinst_level {
 enum cp_built_in_function {
   CP_BUILT_IN_IS_CONSTANT_EVALUATED,
   CP_BUILT_IN_INTEGER_PACK,
+  CP_BUILT_IN_SOURCE_LOCATION,
   CP_BUILT_IN_LAST
 };
 
@@ -6265,7 +6321,9 @@ extern tree convert_for_arg_passing               (tree, tree, tsubst_flags_t);
 extern bool is_properly_derived_from           (tree, tree);
 extern tree initialize_reference               (tree, tree, int,
                                                 tsubst_flags_t);
-extern tree extend_ref_init_temps              (tree, tree, vec<tree, va_gc>**);
+extern tree extend_ref_init_temps              (tree, tree,
+                                                vec<tree, va_gc>**,
+                                                tree * = NULL);
 extern tree make_temporary_var_for_ref_to_temp (tree, tree);
 extern bool type_has_extended_temps            (tree);
 extern tree strip_top_quals                    (tree);
@@ -6277,6 +6335,7 @@ extern tree build_converted_constant_expr (tree, tree, tsubst_flags_t);
 extern tree build_converted_constant_bool_expr (tree, tsubst_flags_t);
 extern tree perform_direct_initialization_if_possible (tree, tree, bool,
                                                        tsubst_flags_t);
+extern vec<tree,va_gc> *resolve_args (vec<tree,va_gc>*, tsubst_flags_t);
 extern tree in_charge_arg_for_name             (tree);
 extern tree build_cxx_call                     (tree, int, tree *,
                                                 tsubst_flags_t,
@@ -6351,6 +6410,8 @@ extern bool type_has_virtual_destructor           (tree);
 extern bool classtype_has_move_assign_or_move_ctor_p (tree, bool user_declared);
 extern bool classtype_has_non_deleted_move_ctor (tree);
 extern tree classtype_has_depr_implicit_copy   (tree);
+extern bool classtype_has_op (tree, tree_code);
+extern tree classtype_has_defaulted_op (tree, tree_code);
 extern bool type_build_ctor_call               (tree);
 extern bool type_build_dtor_call               (tree);
 extern void explain_non_literal_class          (tree);
@@ -6435,6 +6496,7 @@ extern tree groktypename                  (cp_decl_specifier_seq *, const cp_declarator *, bool
 extern tree start_decl                         (const cp_declarator *, cp_decl_specifier_seq *, int, tree, tree, tree *);
 extern void start_decl_1                       (tree, bool);
 extern bool check_array_initializer            (tree, tree, tree);
+extern void omp_declare_variant_finalize       (tree, tree);
 extern void cp_finish_decl                     (tree, tree, bool, tree, int);
 extern tree lookup_decomp_type                 (tree);
 extern void cp_maybe_mangle_decomp             (tree, tree, unsigned int);
@@ -6485,6 +6547,7 @@ extern tmpl_spec_kind current_tmpl_spec_kind      (int);
 extern tree cp_fname_init                      (const char *, tree *);
 extern tree cxx_builtin_function               (tree decl);
 extern tree cxx_builtin_function_ext_scope     (tree decl);
+extern tree cxx_simulate_builtin_function_decl (tree);
 extern tree check_elaborated_type_specifier    (enum tag_types, tree, bool);
 extern void warn_extern_redeclared_static      (tree, tree);
 extern tree cxx_comdat_group                   (tree);
@@ -6520,7 +6583,8 @@ extern bool vague_linkage_p                       (tree);
 extern void grokclassfn                                (tree, tree,
                                                 enum overload_flags);
 extern tree grok_array_decl                    (location_t, tree, tree, bool);
-extern tree delete_sanity                      (tree, tree, bool, int, tsubst_flags_t);
+extern tree delete_sanity                      (location_t, tree, tree, bool,
+                                                int, tsubst_flags_t);
 extern tree check_classfn                      (tree, tree, tree);
 extern void check_member_template              (tree);
 extern tree grokfield (const cp_declarator *, cp_decl_specifier_seq *,
@@ -6594,7 +6658,7 @@ extern void init_exception_processing             (void);
 extern tree expand_start_catch_block           (tree);
 extern void expand_end_catch_block             (void);
 extern tree build_exc_ptr                      (void);
-extern tree build_throw                                (tree);
+extern tree build_throw                                (location_t, tree);
 extern int nothrow_libfn_p                     (const_tree);
 extern void check_handlers                     (tree);
 extern tree finish_noexcept_expr               (tree, tsubst_flags_t);
@@ -6611,7 +6675,6 @@ extern tree begin_eh_spec_block                   (void);
 extern void finish_eh_spec_block               (tree, tree);
 extern tree build_eh_type_type                 (tree);
 extern tree cp_protect_cleanup_actions         (void);
-extern tree create_try_catch_expr               (tree, tree);
 extern tree template_parms_to_args             (tree);
 extern tree template_parms_level_to_args       (tree);
 extern tree generic_targs_for                  (tree);
@@ -6663,11 +6726,11 @@ extern tree build_new                           (vec<tree, va_gc> **, tree, tree,
 extern tree get_temp_regvar                    (tree, tree);
 extern tree build_vec_init                     (tree, tree, tree, bool, int,
                                                  tsubst_flags_t);
-extern tree build_delete                       (tree, tree,
+extern tree build_delete                       (location_t, tree, tree,
                                                 special_function_kind,
                                                 int, int, tsubst_flags_t);
 extern void push_base_cleanups                 (void);
-extern tree build_vec_delete                   (tree, tree,
+extern tree build_vec_delete                   (location_t, tree, tree,
                                                 special_function_kind, int,
                                                 tsubst_flags_t);
 extern tree create_temporary_var               (tree);
@@ -6773,6 +6836,7 @@ extern tree make_constrained_auto         (tree, tree);
 extern tree make_constrained_decltype_auto     (tree, tree);
 extern tree make_template_placeholder          (tree);
 extern bool template_placeholder_p             (tree);
+extern bool ctad_template_p                    (tree);
 extern tree do_auto_deduction                   (tree, tree, tree,
                                                  tsubst_flags_t
                                                 = tf_warning_or_error,
@@ -6891,8 +6955,9 @@ extern tree instantiate_non_dependent_expr_internal (tree, tsubst_flags_t);
 extern tree instantiate_non_dependent_or_null   (tree);
 extern bool variable_template_specialization_p  (tree);
 extern bool alias_type_or_template_p            (tree);
-extern bool alias_template_specialization_p     (const_tree);
-extern bool dependent_alias_template_spec_p     (const_tree);
+enum { nt_opaque = false, nt_transparent = true };
+extern tree alias_template_specialization_p     (const_tree, bool);
+extern tree dependent_alias_template_spec_p     (const_tree, bool);
 extern bool template_parm_object_p             (const_tree);
 extern bool explicit_class_specialization_p     (tree);
 extern bool push_tinst_level                    (tree);
@@ -6935,7 +7000,8 @@ extern tree build_typeid                  (tree, tsubst_flags_t);
 extern tree get_tinfo_decl                     (tree);
 extern tree get_typeid                         (tree, tsubst_flags_t);
 extern tree build_headof                       (tree);
-extern tree build_dynamic_cast                 (tree, tree, tsubst_flags_t);
+extern tree build_dynamic_cast                 (location_t, tree, tree,
+                                                tsubst_flags_t);
 extern void emit_support_tinfos                        (void);
 extern bool emit_tinfo_decl                    (tree);
 
@@ -7260,6 +7326,7 @@ extern bool trivial_type_p                        (const_tree);
 extern bool trivially_copyable_p               (const_tree);
 extern bool type_has_unique_obj_representations (const_tree);
 extern bool scalarish_type_p                   (const_tree);
+extern bool structural_type_p                  (tree, bool = false);
 extern bool type_has_nontrivial_default_init   (const_tree);
 extern bool type_has_nontrivial_copy_init      (const_tree);
 extern void maybe_warn_parm_abi                        (tree, location_t);
@@ -7292,6 +7359,8 @@ extern tree build_min_nt_call_vec (tree, vec<tree, va_gc> *);
 extern tree build_min_non_dep_call_vec         (tree, tree, vec<tree, va_gc> *);
 extern vec<tree, va_gc>* vec_copy_and_insert    (vec<tree, va_gc>*, tree, unsigned);
 extern tree build_cplus_new                    (tree, tree, tsubst_flags_t);
+extern tree build_local_temp                   (tree);
+extern bool is_local_temp                      (tree);
 extern tree build_aggr_init_expr               (tree, tree);
 extern tree get_target_expr                    (tree);
 extern tree get_target_expr_sfinae             (tree, tsubst_flags_t);
@@ -7379,6 +7448,11 @@ extern tree cxx_copy_lang_qualifiers             (const_tree, const_tree);
 
 extern void cxx_print_statistics               (void);
 extern bool maybe_warn_zero_as_null_pointer_constant (tree, location_t);
+/* Analogous to initializer_zerop but also examines the type for
+   which the initializer is being used.  Unlike initializer_zerop,
+   considers empty strings to be zero initializers for arrays and
+   non-zero for pointers.  */
+extern bool type_initializer_zero_p            (tree, tree);
 
 /* in ptree.c */
 extern void cxx_print_xnode                    (FILE *, tree, int);
@@ -7396,7 +7470,8 @@ enum compare_bounds_t { bounds_none, bounds_either, bounds_first };
 
 extern bool cxx_mark_addressable               (tree, bool = false);
 extern int string_conv_p                       (const_tree, const_tree, int);
-extern tree cp_truthvalue_conversion           (tree);
+extern tree cp_truthvalue_conversion           (tree, tsubst_flags_t);
+extern tree contextual_conv_bool               (tree, tsubst_flags_t);
 extern tree condition_conversion               (tree);
 extern tree require_complete_type              (tree);
 extern tree require_complete_type_sfinae       (tree, tsubst_flags_t);
@@ -7413,8 +7488,10 @@ extern bool compparms                            (const_tree, const_tree);
 extern int comp_cv_qualification               (const_tree, const_tree);
 extern int comp_cv_qualification               (int, int);
 extern int comp_cv_qual_signature              (tree, tree);
-extern tree cxx_sizeof_or_alignof_expr         (tree, enum tree_code, bool);
-extern tree cxx_sizeof_or_alignof_type         (tree, enum tree_code, bool, bool);
+extern tree cxx_sizeof_or_alignof_expr         (location_t, tree,
+                                                enum tree_code, bool);
+extern tree cxx_sizeof_or_alignof_type         (location_t, tree,
+                                                enum tree_code, bool, bool);
 extern tree cxx_alignas_expr                    (tree);
 extern tree cxx_sizeof_nowarn                   (tree);
 extern tree is_bitfield_expr_with_lowered_type  (const_tree);
@@ -7426,10 +7503,13 @@ extern tree build_class_member_access_expr      (cp_expr, tree, tree, bool,
                                                 tsubst_flags_t);
 extern tree finish_class_member_access_expr     (cp_expr, tree, bool,
                                                 tsubst_flags_t);
+extern tree lookup_destructor                  (tree, tree, tree, tsubst_flags_t);
 extern tree build_x_indirect_ref               (location_t, tree,
-                                                ref_operator, tsubst_flags_t);
-extern tree cp_build_indirect_ref              (tree, ref_operator,
-                                                 tsubst_flags_t);
+                                                ref_operator,
+                                                tsubst_flags_t);
+extern tree cp_build_indirect_ref              (location_t, tree,
+                                                ref_operator,
+                                                tsubst_flags_t);
 extern tree cp_build_fold_indirect_ref         (tree);
 extern tree build_array_ref                    (location_t, tree, tree);
 extern tree cp_build_array_ref                 (location_t, tree, tree,
@@ -7445,6 +7525,13 @@ extern tree build_x_binary_op                    (const op_location_t &,
                                                 enum tree_code, tree,
                                                 enum tree_code, tree *,
                                                 tsubst_flags_t);
+inline tree build_x_binary_op (const op_location_t &loc,
+                              enum tree_code code, tree arg1, tree arg2,
+                              tsubst_flags_t complain)
+{
+  return build_x_binary_op (loc, code, arg1, TREE_CODE (arg1), arg2,
+                           TREE_CODE (arg2), NULL, complain);
+}
 extern tree build_x_array_ref                  (location_t, tree, tree,
                                                 tsubst_flags_t);
 extern tree build_x_unary_op                   (location_t,
@@ -7467,13 +7554,17 @@ extern tree build_x_compound_expr               (location_t, tree, tree,
                                                 tsubst_flags_t);
 extern tree build_compound_expr                 (location_t, tree, tree);
 extern tree cp_build_compound_expr             (tree, tree, tsubst_flags_t);
-extern tree build_static_cast                  (tree, tree, tsubst_flags_t);
-extern tree build_reinterpret_cast             (tree, tree, tsubst_flags_t);
-extern tree build_const_cast                   (tree, tree, tsubst_flags_t);
+extern tree build_static_cast                  (location_t, tree, tree,
+                                                tsubst_flags_t);
+extern tree build_reinterpret_cast             (location_t, tree, tree,
+                                                tsubst_flags_t);
+extern tree build_const_cast                   (location_t, tree, tree,
+                                                tsubst_flags_t);
 extern tree build_c_cast                       (location_t, tree, tree);
 extern cp_expr build_c_cast                    (location_t loc, tree type,
                                                 cp_expr expr);
-extern tree cp_build_c_cast                    (tree, tree, tsubst_flags_t);
+extern tree cp_build_c_cast                    (location_t, tree, tree,
+                                                tsubst_flags_t);
 extern cp_expr build_x_modify_expr             (location_t, tree,
                                                 enum tree_code, tree,
                                                 tsubst_flags_t);
@@ -7501,19 +7592,22 @@ extern tree build_ptrmemfunc1                   (tree, tree, tree);
 extern void expand_ptrmemfunc_cst              (tree, tree *, tree *);
 extern tree type_after_usual_arithmetic_conversions (tree, tree);
 extern tree common_pointer_type                 (tree, tree);
-extern tree composite_pointer_type             (tree, tree, tree, tree,
+extern tree composite_pointer_type             (const op_location_t &,
+                                                tree, tree, tree, tree,
                                                 composite_pointer_operation,
                                                 tsubst_flags_t);
 extern tree merge_types                                (tree, tree);
 extern tree strip_array_domain                 (tree);
 extern tree check_return_expr                  (tree, bool *);
+extern tree spaceship_type                     (tree, tsubst_flags_t = tf_warning_or_error);
+extern tree genericize_spaceship               (tree, tree, tree);
 extern tree cp_build_binary_op                  (const op_location_t &,
                                                 enum tree_code, tree, tree,
                                                 tsubst_flags_t);
 extern tree build_x_vec_perm_expr               (location_t,
                                                 tree, tree, tree,
                                                 tsubst_flags_t);
-#define cxx_sizeof(T)  cxx_sizeof_or_alignof_type (T, SIZEOF_EXPR, false, true)
+#define cxx_sizeof(T)  cxx_sizeof_or_alignof_type (input_location, T, SIZEOF_EXPR, false, true)
 extern tree build_simple_component_ref         (tree, tree);
 extern tree build_ptrmemfunc_access_expr       (tree, tree);
 extern tree build_address                      (tree);
@@ -7530,7 +7624,8 @@ extern int lvalue_or_else                 (tree, enum lvalue_use,
 extern void check_template_keyword             (tree);
 extern bool check_raw_literal_operator         (const_tree decl);
 extern bool check_literal_operator_args                (const_tree, bool *, bool *);
-extern void maybe_warn_about_useless_cast       (tree, tree, tsubst_flags_t);
+extern void maybe_warn_about_useless_cast       (location_t, tree, tree,
+                                                tsubst_flags_t);
 extern tree cp_perform_integral_promotions      (tree, tsubst_flags_t);
 
 extern tree finish_left_unary_fold_expr      (tree, int);
@@ -7598,7 +7693,8 @@ extern tree build_scoped_ref                      (tree, tree, tree *);
 extern tree build_x_arrow                      (location_t, tree,
                                                 tsubst_flags_t);
 extern tree build_m_component_ref              (tree, tree, tsubst_flags_t);
-extern tree build_functional_cast              (tree, tree, tsubst_flags_t);
+extern tree build_functional_cast              (location_t, tree, tree,
+                                                tsubst_flags_t);
 extern tree add_exception_specifier            (tree, tree, tsubst_flags_t);
 extern tree merge_exception_specifiers         (tree, tree);
 
@@ -7658,6 +7754,7 @@ extern void clear_fold_cache                      (void);
 extern tree lookup_hotness_attribute           (tree);
 extern tree process_stmt_hotness_attribute     (tree, location_t);
 extern bool simple_empty_class_p               (tree, tree, tree_code);
+extern tree fold_builtin_source_location       (location_t);
 
 /* in name-lookup.c */
 extern tree strip_using_decl                    (tree);
@@ -7704,7 +7801,8 @@ extern cp_expr finish_constraint_and_expr (location_t, cp_expr, cp_expr);
 extern cp_expr finish_constraint_primary_expr  (cp_expr);
 extern tree finish_concept_definition          (cp_expr, tree);
 extern tree combine_constraint_expressions      (tree, tree);
-extern tree get_constraints                     (tree);
+extern tree append_constraint                  (tree, tree);
+extern tree get_constraints                     (const_tree);
 extern void set_constraints                     (tree, tree);
 extern void remove_constraints                  (tree);
 extern tree current_template_constraints       (void);
@@ -7754,8 +7852,8 @@ extern bool processing_constraint_expression_p    ();
 extern tree unpack_concept_check               (tree);
 extern tree evaluate_concept_check              (tree, tsubst_flags_t);
 extern tree satisfy_constraint_expression      (tree);
-extern bool constraints_satisfied_p             (tree);
-extern bool constraints_satisfied_p             (tree, tree);
+extern bool constraints_satisfied_p            (tree);
+extern bool constraints_satisfied_p            (tree, tree);
 extern void clear_satisfaction_cache           ();
 extern bool* lookup_subsumption_result          (tree, tree);
 extern bool save_subsumption_result             (tree, tree, bool);
@@ -7766,6 +7864,7 @@ extern bool subsumes_constraints                (tree, tree);
 extern bool strictly_subsumes                  (tree, tree, tree);
 extern bool weakly_subsumes                    (tree, tree, tree);
 extern int more_constrained                     (tree, tree);
+extern bool at_least_as_constrained             (tree, tree);
 extern bool constraints_equivalent_p            (tree, tree);
 extern bool atomic_constraints_identical_p     (tree, tree);
 extern hashval_t iterative_hash_constraint      (tree, hashval_t);
@@ -7810,7 +7909,7 @@ extern tree maybe_constant_value          (tree, tree = NULL_TREE, bool = false);
 extern tree maybe_constant_init                        (tree, tree = NULL_TREE, bool = false);
 extern tree fold_non_dependent_expr            (tree,
                                                 tsubst_flags_t = tf_warning_or_error,
-                                                bool = false);
+                                                bool = false, tree = NULL_TREE);
 extern tree fold_non_dependent_init            (tree,
                                                 tsubst_flags_t = tf_warning_or_error,
                                                 bool = false);