]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/cp/cp-tree.h
c++: ICE with using and enum [PR100659]
[gcc.git] / gcc / cp / cp-tree.h
index 0c4b74a8895012440c89f69defebaa8e7e0980f3..aa202715873b28ddbcb3f993574ac0ad411609f8 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for -*- C++ -*- parsing and type checking.
-   Copyright (C) 1987-2020 Free Software Foundation, Inc.
+   Copyright (C) 1987-2021 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
@@ -129,7 +129,6 @@ enum cp_tree_index
     CPTI_VTBL_TYPE,
     CPTI_VTBL_PTR_TYPE,
     CPTI_GLOBAL,
-    CPTI_GLOBAL_TYPE,
     CPTI_ABORT_FNDECL,
     CPTI_AGGR_TAG,
     CPTI_CONV_OP_MARKER,
@@ -193,7 +192,9 @@ enum cp_tree_index
 
     CPTI_MODULE_HWM,
     /* Nodes after here change during compilation, or should not be in
-       the module's global tree table.  */
+       the module's global tree table.  Such nodes must be locatable
+       via name lookup or type-construction, as those are the only
+       cross-TU matching capabilities remaining.  */
 
     /* We must find these via the global namespace.  */
     CPTI_STD,
@@ -248,7 +249,6 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
 #define std_node                       cp_global_trees[CPTI_STD]
 #define abi_node                       cp_global_trees[CPTI_ABI]
 #define global_namespace               cp_global_trees[CPTI_GLOBAL]
-#define global_type_node               cp_global_trees[CPTI_GLOBAL_TYPE]
 #define const_type_info_type_node      cp_global_trees[CPTI_CONST_TYPE_INFO_TYPE]
 #define type_info_ptr_type             cp_global_trees[CPTI_TYPE_INFO_PTR_TYPE]
 #define conv_op_marker                 cp_global_trees[CPTI_CONV_OP_MARKER]
@@ -481,6 +481,7 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
       SWITCH_STMT_NO_BREAK_P (in SWITCH_STMT)
       LAMBDA_EXPR_CAPTURE_OPTIMIZED (in LAMBDA_EXPR)
       IMPLICIT_CONV_EXPR_BRACED_INIT (in IMPLICIT_CONV_EXPR)
+      PACK_EXPANSION_AUTO_P (in *_PACK_EXPANSION)
    3: IMPLICIT_RVALUE_P (in NON_LVALUE_EXPR or STATIC_CAST_EXPR)
       ICS_BAD_FLAG (in _CONV)
       FN_TRY_BLOCK_P (in TRY_BLOCK)
@@ -489,12 +490,11 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
       DECLTYPE_FOR_REF_CAPTURE (in DECLTYPE_TYPE)
       CONSTRUCTOR_C99_COMPOUND_LITERAL (in CONSTRUCTOR)
       OVL_NESTED_P (in OVERLOAD)
-      LAMBDA_EXPR_INSTANTIATED (in LAMBDA_EXPR)
-      Reserved for DECL_MODULE_EXPORT (in DECL_)
+      DECL_MODULE_EXPORT_P (in _DECL)
    4: IDENTIFIER_MARKED (IDENTIFIER_NODEs)
       TREE_HAS_CONSTRUCTOR (in INDIRECT_REF, SAVE_EXPR, CONSTRUCTOR,
          CALL_EXPR, or FIELD_DECL).
-      DECL_TINFO_P (in VAR_DECL)
+      DECL_TINFO_P (in VAR_DECL, TYPE_DECL)
       FUNCTION_REF_QUALIFIED (in FUNCTION_TYPE, METHOD_TYPE)
       OVL_LOOKUP_P (in OVERLOAD)
       LOOKUP_FOUND_P (in RECORD_TYPE, UNION_TYPE, ENUMERAL_TYPE, NAMESPACE_DECL)
@@ -502,6 +502,7 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
       FUNCTION_RVALUE_QUALIFIED (in FUNCTION_TYPE, METHOD_TYPE)
       CALL_EXPR_REVERSE_ARGS (in CALL_EXPR, AGGR_INIT_EXPR)
       CONSTRUCTOR_PLACEHOLDER_BOUNDARY (in CONSTRUCTOR)
+      OVL_EXPORT_P (in OVERLOAD)
    6: TYPE_MARKED_P (in _TYPE)
       DECL_NONTRIVIALLY_INITIALIZED_P (in VAR_DECL)
       RANGE_FOR_IVDEP (in RANGE_FOR_STMT)
@@ -544,6 +545,7 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
       DECL_ANON_UNION_VAR_P (in a VAR_DECL)
       DECL_SELF_REFERENCE_P (in a TYPE_DECL)
       DECL_INVALID_OVERRIDER_P (in a FUNCTION_DECL)
+      DECL_UNINSTANIATED_TEMPLATE_FRIEND_P (in TEMPLATE_DECL)
    5: DECL_INTERFACE_KNOWN.
    6: DECL_THIS_STATIC (in VAR_DECL, FUNCTION_DECL or PARM_DECL)
       DECL_FIELD_IS_BASE (in FIELD_DECL)
@@ -778,6 +780,8 @@ typedef struct ptrmem_cst * ptrmem_cst_t;
 #define OVL_NESTED_P(NODE)     TREE_LANG_FLAG_3 (OVERLOAD_CHECK (NODE))
 /* If set, this overload was constructed during lookup.  */
 #define OVL_LOOKUP_P(NODE)     TREE_LANG_FLAG_4 (OVERLOAD_CHECK (NODE))
+/* If set, this OVL_USING_P overload is exported.  */
+#define OVL_EXPORT_P(NODE)     TREE_LANG_FLAG_5 (OVERLOAD_CHECK (NODE))
 
 /* The first decl of an overload.  */
 #define OVL_FIRST(NODE)        ovl_first (NODE)
@@ -813,11 +817,6 @@ class ovl_iterator {
   {
   }
 
- private:
-  /* Do not duplicate.  */
-  ovl_iterator &operator= (const ovl_iterator &);
-  ovl_iterator (const ovl_iterator &);
-
  public:
   operator bool () const
   {
@@ -837,6 +836,15 @@ class ovl_iterator {
 
     return fn;
   }
+  bool operator== (const ovl_iterator &o) const
+  {
+    return ovl == o.ovl;
+  }
+  tree get_using () const
+  {
+    gcc_checking_assert (using_p ());
+    return ovl;
+  }
 
  public:
   /* Whether this overload was introduced by a using decl.  */
@@ -845,6 +853,12 @@ class ovl_iterator {
     return (TREE_CODE (ovl) == USING_DECL
            || (TREE_CODE (ovl) == OVERLOAD && OVL_USING_P (ovl)));
   }
+  /* Whether this using is being exported.  */
+  bool exporting_p () const
+  {
+    return OVL_EXPORT_P (get_using ());
+  }
+  
   bool hidden_p () const
   {
     return TREE_CODE (ovl) == OVERLOAD && OVL_HIDDEN_P (ovl);
@@ -888,6 +902,19 @@ class ovl_iterator {
   static tree reveal_node (tree ovl, tree node);
 };
 
+/* Treat a tree as a range of ovl_iterator, e.g.
+   for (tree f : ovl_range (fns)) { ... }  */
+
+class ovl_range
+{
+  tree t;
+  bool allow;
+public:
+  explicit ovl_range (tree t, bool allow = false): t(t), allow(allow) { }
+  ovl_iterator begin() { return ovl_iterator (t, allow); }
+  ovl_iterator end() { return ovl_iterator (NULL_TREE, allow); }
+};
+
 /* Iterator over a (potentially) 2 dimensional overload, which is
    produced by name lookup.  */
 
@@ -920,6 +947,18 @@ class lkp_iterator : public ovl_iterator {
   }
 };
 
+/* Treat a tree as a range of lkp_iterator, e.g.
+   for (tree f : lkp_range (fns)) { ... }  */
+
+class lkp_range
+{
+  tree t;
+public:
+  lkp_range (tree t): t(t) { }
+  lkp_iterator begin() { return lkp_iterator (t); }
+  lkp_iterator end() { return lkp_iterator (NULL_TREE); }
+};
+
 /* hash traits for declarations.  Hashes potential overload sets via
    DECL_NAME.  */
 
@@ -960,8 +999,10 @@ public:
   operator vec_t *() const { return v; }
   vec_t ** operator& () { return &v; }
 
-  /* Breaks pointer/value consistency for convenience.  */
-  tree& operator[] (unsigned i) const { return (*v)[i]; }
+  /* Breaks pointer/value consistency for convenience.  This takes ptrdiff_t
+     rather than unsigned to avoid ambiguity with the built-in operator[]
+     (bootstrap/91828).  */
+  tree& operator[] (ptrdiff_t i) const { return (*v)[i]; }
 
   ~releasing_vec() { release_tree_vector (v); }
 private:
@@ -1130,24 +1171,16 @@ enum GTY(()) abstract_class_use {
 
 /* Macros for access to language-specific slots in an identifier.  */
 
-/* The IDENTIFIER_BINDING is the innermost cxx_binding for the
-    identifier.  Its PREVIOUS is the next outermost binding.  Each
-    VALUE field is a DECL for the associated declaration.  Thus,
-    name lookup consists simply of pulling off the node at the front
-    of the list (modulo oddities for looking up the names of types,
-    and such.)  You can use SCOPE field to determine the scope
-    that bound the name.  */
+/* Identifiers map directly to block or class-scope bindings.
+   Namespace-scope bindings are held in hash tables on the respective
+   namespaces.  The identifier bindings are the innermost active
+   binding, from whence you can get the decl and/or implicit-typedef
+   of an elaborated type.   When not bound to a local entity the
+   values are NULL.  */
 #define IDENTIFIER_BINDING(NODE) \
   (LANG_IDENTIFIER_CAST (NODE)->bindings)
-
-/* TREE_TYPE only indicates on local and class scope the current
-   type. For namespace scope, the presence of a type in any namespace
-   is indicated with global_type_node, and the real type behind must
-   be found through lookup.  */
-#define IDENTIFIER_TYPE_VALUE(NODE) identifier_type_value (NODE)
 #define REAL_IDENTIFIER_TYPE_VALUE(NODE) TREE_TYPE (NODE)
 #define SET_IDENTIFIER_TYPE_VALUE(NODE,TYPE) (TREE_TYPE (NODE) = (TYPE))
-#define IDENTIFIER_HAS_TYPE_VALUE(NODE) (IDENTIFIER_TYPE_VALUE (NODE) ? 1 : 0)
 
 /* Kinds of identifiers.  Values are carefully chosen.  */
 enum cp_identifier_kind {
@@ -1424,10 +1457,6 @@ enum cp_lambda_default_capture_mode_type {
 #define LAMBDA_EXPR_CAPTURE_OPTIMIZED(NODE) \
   TREE_LANG_FLAG_2 (LAMBDA_EXPR_CHECK (NODE))
 
-/* True iff this LAMBDA_EXPR was generated in tsubst_lambda_expr.  */
-#define LAMBDA_EXPR_INSTANTIATED(NODE) \
-  TREE_LANG_FLAG_3 (LAMBDA_EXPR_CHECK (NODE))
-
 /* True if this TREE_LIST in LAMBDA_EXPR_CAPTURE_LIST is for an explicit
    capture.  */
 #define LAMBDA_CAPTURE_EXPLICIT_P(NODE) \
@@ -1451,6 +1480,13 @@ enum cp_lambda_default_capture_mode_type {
 #define LAMBDA_EXPR_PENDING_PROXIES(NODE) \
   (((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->pending_proxies)
 
+/* If NODE was regenerated via tsubst_lambda_expr, this is a TEMPLATE_INFO
+   whose TI_TEMPLATE is the immediate LAMBDA_EXPR from which NODE was
+   regenerated, and TI_ARGS is the full set of template arguments used
+   to regenerate NODE from the most general lambda.  */
+#define LAMBDA_EXPR_REGEN_INFO(NODE) \
+  (((struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (NODE))->regen_info)
+
 /* The closure type of the lambda, which is also the type of the
    LAMBDA_EXPR.  */
 #define LAMBDA_EXPR_CLOSURE(NODE) \
@@ -1462,6 +1498,7 @@ struct GTY (()) tree_lambda_expr
   tree capture_list;
   tree this_capture;
   tree extra_scope;
+  tree regen_info;
   vec<tree, va_gc> *pending_proxies;
   location_t locus;
   enum cp_lambda_default_capture_mode_type default_capture_mode : 8;
@@ -1569,11 +1606,19 @@ check_constraint_info (tree t)
 #define COMPOUND_REQ_NOEXCEPT_P(NODE) \
   TREE_LANG_FLAG_0 (TREE_CHECK (NODE, COMPOUND_REQ))
 
-/* The constraints on an 'auto' placeholder type, used in an argument deduction
-   constraint.  */
-#define PLACEHOLDER_TYPE_CONSTRAINTS(NODE) \
+/* A TREE_LIST whose TREE_VALUE is the constraints on the 'auto' placeholder
+   type NODE, used in an argument deduction constraint.  The TREE_PURPOSE
+   holds the set of template parameters that were in-scope when this 'auto'
+   was formed.  */
+#define PLACEHOLDER_TYPE_CONSTRAINTS_INFO(NODE) \
   DECL_SIZE_UNIT (TYPE_NAME (NODE))
 
+/* The constraints on the 'auto' placeholder type NODE.  */
+#define PLACEHOLDER_TYPE_CONSTRAINTS(NODE)                \
+  (PLACEHOLDER_TYPE_CONSTRAINTS_INFO (NODE)               \
+   ? TREE_VALUE (PLACEHOLDER_TYPE_CONSTRAINTS_INFO (NODE)) \
+   : NULL_TREE)
+
 /* True if NODE is a constraint.  */
 #define CONSTR_P(NODE)                  \
   (TREE_CODE (NODE) == ATOMIC_CONSTR    \
@@ -1644,6 +1689,37 @@ check_constraint_info (tree t)
 #define CONSTRAINED_PARM_PROTOTYPE(NODE) \
   DECL_INITIAL (TYPE_DECL_CHECK (NODE))
 
+/* Module flags on FUNCTION,VAR,TYPE,CONCEPT or NAMESPACE
+   A TEMPLATE_DECL holds them on the DECL_TEMPLATE_RESULT object --
+   it's just not practical to keep them consistent.  */
+#define DECL_MODULE_CHECK(NODE)                                                \
+  TREE_NOT_CHECK (NODE, TEMPLATE_DECL)
+
+/* In the purview of a module (including header unit).  */
+#define DECL_MODULE_PURVIEW_P(N) \
+  (DECL_LANG_SPECIFIC (DECL_MODULE_CHECK (N))->u.base.module_purview_p)
+
+/* True if the live version of the decl was imported.  */
+#define DECL_MODULE_IMPORT_P(NODE) \
+  (DECL_LANG_SPECIFIC (DECL_MODULE_CHECK (NODE))->u.base.module_import_p)
+
+/* True if this decl is in the entity hash & array.  This means that
+   some variant was imported, even if DECL_MODULE_IMPORT_P is false.  */
+#define DECL_MODULE_ENTITY_P(NODE) \
+  (DECL_LANG_SPECIFIC (DECL_MODULE_CHECK (NODE))->u.base.module_entity_p)
+
+/* DECL that has attached decls for ODR-relatedness.  */
+#define DECL_MODULE_ATTACHMENTS_P(NODE)                        \
+  (DECL_LANG_SPECIFIC (TREE_CHECK2(NODE,FUNCTION_DECL,VAR_DECL))\
+   ->u.base.module_attached_p)
+
+/* Whether this is an exported DECL.  Held on any decl that can appear
+   at namespace scope (function, var, type, template, const or
+   namespace).  templates copy from their template_result, consts have
+   it for unscoped enums.  */
+#define DECL_MODULE_EXPORT_P(NODE) TREE_LANG_FLAG_3 (NODE)
+
+\f
 /* The list of local parameters introduced by this requires-expression,
    in the form of a chain of PARM_DECLs.  */
 #define REQUIRES_EXPR_PARMS(NODE) \
@@ -1665,6 +1741,7 @@ enum cp_tree_node_structure_enum {
   TS_CP_TPI,
   TS_CP_PTRMEM,
   TS_CP_OVERLOAD,
+  TS_CP_BINDING_VECTOR,
   TS_CP_BASELINK,
   TS_CP_TEMPLATE_DECL,
   TS_CP_DEFERRED_PARSE,
@@ -1686,6 +1763,7 @@ union GTY((desc ("cp_tree_node_structure (&%h)"),
   struct template_parm_index GTY ((tag ("TS_CP_TPI"))) tpi;
   struct ptrmem_cst GTY ((tag ("TS_CP_PTRMEM"))) ptrmem;
   struct tree_overload GTY ((tag ("TS_CP_OVERLOAD"))) overload;
+  struct tree_binding_vec GTY ((tag ("TS_CP_BINDING_VECTOR"))) binding_vec;
   struct tree_baselink GTY ((tag ("TS_CP_BASELINK"))) baselink;
   struct tree_template_decl GTY ((tag ("TS_CP_TEMPLATE_DECL"))) template_decl;
   struct tree_deferred_parse GTY ((tag ("TS_CP_DEFERRED_PARSE"))) deferred_parse;
@@ -1873,6 +1951,38 @@ public:
   ~temp_override() { overridden_variable = saved_value; }
 };
 
+/* Wrapping a template parameter in type_identity_t hides it from template
+   argument deduction.  */
+#if __cpp_lib_type_identity
+using std::type_identity_t;
+#else
+template <typename T>
+struct type_identity { typedef T type; };
+template <typename T>
+using type_identity_t = typename type_identity<T>::type;
+#endif
+
+/* Object generator function for temp_override, so you don't need to write the
+   type of the object as a template argument.
+
+   Use as auto x = make_temp_override (flag); */
+
+template <typename T>
+inline temp_override<T>
+make_temp_override (T& var)
+{
+  return { var };
+}
+
+/* Likewise, but use as auto x = make_temp_override (flag, value); */
+
+template <typename T>
+inline temp_override<T>
+make_temp_override (T& var, type_identity_t<T> overrider)
+{
+  return { var, overrider };
+}
+
 /* The cached class binding level, from the most recently exited
    class, or NULL if none.  */
 
@@ -2653,15 +2763,15 @@ enum lang_decl_selector
 /* Flags shared by all forms of DECL_LANG_SPECIFIC.
 
    Some of the flags live here only to make lang_decl_min/fn smaller.  Do
-   not make this struct larger than 32 bits; instead, make sel smaller.  */
+   not make this struct larger than 32 bits.  */
 
 struct GTY(()) lang_decl_base {
-  /* Larger than necessary for faster access.  */
-  ENUM_BITFIELD(lang_decl_selector) selector : 16;
+  ENUM_BITFIELD(lang_decl_selector) selector : 3;
   ENUM_BITFIELD(languages) language : 1;
   unsigned use_template : 2;
   unsigned not_really_extern : 1;         /* var or fn */
   unsigned initialized_in_class : 1;      /* var or fn */
+
   unsigned threadprivate_or_deleted_p : 1; /* var or fn */
   /* anticipated_p is no longer used for anticipated_decls (fn, type
      or template).  It is used as DECL_OMP_PRIVATIZED_MEMBER in
@@ -2670,11 +2780,20 @@ struct GTY(()) lang_decl_base {
   unsigned friend_or_tls : 1;             /* var, fn, type or template */
   unsigned unknown_bound_p : 1;                   /* var */
   unsigned odr_used : 1;                  /* var or fn */
-  unsigned spare : 1;
   unsigned concept_p : 1;                  /* applies to vars and functions */
   unsigned var_declared_inline_p : 1;     /* var */
   unsigned dependent_init_p : 1;          /* var */
-  /* 2 spare bits */
+
+  /* The following apply to VAR, FUNCTION, TYPE, CONCEPT, & NAMESPACE
+     decls.  */
+  unsigned module_purview_p : 1;          /* in module purview (not GMF) */
+  unsigned module_import_p : 1;           /* from an import */
+  unsigned module_entity_p : 1;                   /* is in the entitity ary &
+                                             hash.  */
+  /* VAR_DECL or FUNCTION_DECL has attached decls.     */
+  unsigned module_attached_p : 1;
+
+  /* 12 spare bits.  */
 };
 
 /* True for DECL codes which have template info and access.  */
@@ -3107,6 +3226,13 @@ struct GTY(()) lang_decl {
   (DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE)) \
    ->u.base.friend_or_tls)
 
+/* True of a TEMPLATE_DECL that is a template class friend.  Such
+   decls are not pushed until instantiated (as they may depend on
+   parameters of the befriending class).  DECL_CHAIN is the
+   befriending class.  */
+#define DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P(NODE) \
+  (DECL_LANG_FLAG_4 (TEMPLATE_DECL_CHECK (NODE)))
+
 /* Nonzero if the thread-local variable was declared with __thread as
    opposed to thread_local.  */
 #define DECL_GNU_TLS_P(NODE)                           \
@@ -3348,7 +3474,8 @@ struct GTY(()) lang_decl {
 
 /* 1 iff VAR_DECL node NODE is a type-info decl.  This flag is set for
    both the primary typeinfo object and the associated NTBS name.  */
-#define DECL_TINFO_P(NODE) TREE_LANG_FLAG_4 (VAR_DECL_CHECK (NODE))
+#define DECL_TINFO_P(NODE)                     \
+  TREE_LANG_FLAG_4 (TREE_CHECK2 (NODE,VAR_DECL,TYPE_DECL))
 
 /* 1 iff VAR_DECL node NODE is virtual table or VTT.  We forward to
    DECL_VIRTUAL_P from the common code, as that has the semantics we
@@ -3426,6 +3553,7 @@ struct GTY(()) lang_decl {
    created by handle_using_decl.  */
 #define CONST_DECL_USING_P(NODE)                       \
   (TREE_CODE (NODE) == CONST_DECL                      \
+   && TREE_TYPE (NODE)                                 \
    && TREE_CODE (TREE_TYPE (NODE)) == ENUMERAL_TYPE    \
    && DECL_CONTEXT (NODE) != TREE_TYPE (NODE))
 
@@ -3529,9 +3657,10 @@ struct GTY(()) lang_decl {
 /* Set the template information for a non-alias n ENUMERAL_, RECORD_,
    or UNION_TYPE to VAL.  ALIAS's are dealt with separately.  */
 #define SET_TYPE_TEMPLATE_INFO(NODE, VAL)                              \
-  (gcc_checking_assert (TREE_CODE (NODE) == ENUMERAL_TYPE              \
-                       || (CLASS_TYPE_P (NODE) && !TYPE_ALIAS_P (NODE))), \
-   (TYPE_LANG_SLOT_1 (NODE) = (VAL)))                                  \
+  (TREE_CODE (NODE) == ENUMERAL_TYPE           \
+   || (CLASS_TYPE_P (NODE) && !TYPE_ALIAS_P (NODE))                    \
+   ? (TYPE_LANG_SLOT_1 (NODE) = (VAL))                                 \
+   : (DECL_TEMPLATE_INFO (TYPE_NAME (NODE)) = (VAL)))                  \
 
 #define TI_TEMPLATE(NODE) \
   ((struct tree_template_info*)TEMPLATE_INFO_CHECK (NODE))->tmpl
@@ -3665,8 +3794,8 @@ struct GTY(()) lang_decl {
 
       template <typename T> struct S {};
       template <typename T> struct S<T*> {};
-      
-   the CLASSTPYE_TI_TEMPLATE for S<int*> will be S, not the S<T*>.
+
+   the CLASSTYPE_TI_TEMPLATE for S<int*> will be S, not the S<T*>.
 
    For a member class template, CLASSTYPE_TI_TEMPLATE always refers to the
    partial instantiation rather than the primary template.  CLASSTYPE_TI_ARGS
@@ -3755,6 +3884,9 @@ struct GTY(()) lang_decl {
 /* True iff this pack expansion is for sizeof....  */
 #define PACK_EXPANSION_SIZEOF_P(NODE) TREE_LANG_FLAG_1 (NODE)
 
+/* True iff this pack expansion is for auto... in lambda init-capture.  */
+#define PACK_EXPANSION_AUTO_P(NODE) TREE_LANG_FLAG_2 (NODE)
+
 /* True iff the wildcard can match a template parameter pack.  */
 #define WILDCARD_PACK_P(NODE) TREE_LANG_FLAG_0 (NODE)
 
@@ -4300,7 +4432,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
    When appearing in a SAVE_EXPR, it means that underneath
    is a call to a constructor.
 
-   When appearing in a CONSTRUCTOR, the expression is a
+   When appearing in a CONSTRUCTOR, the expression is an unconverted
    compound literal.
 
    When appearing in a FIELD_DECL, it means that this field
@@ -4312,7 +4444,9 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
   (TREE_CODE (NODE) == CONSTRUCTOR && TREE_TYPE (NODE) == init_list_type_node)
 
 /* True if NODE is a compound-literal, i.e., a brace-enclosed
-   initializer cast to a particular type.  */
+   initializer cast to a particular type.  This is mostly only set during
+   template parsing; once the initializer has been digested into an actual
+   value of the type, the expression is represented by a TARGET_EXPR.  */
 #define COMPOUND_LITERAL_P(NODE) \
   (TREE_CODE (NODE) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR (NODE))
 
@@ -5339,11 +5473,14 @@ extern GTY(()) tree integer_two_node;
    function, two inside the body of a function in a local class, etc.)  */
 extern int function_depth;
 
-/* Nonzero if we are inside eq_specializations, which affects
-   comparison of PARM_DECLs in cp_tree_equal and alias specializations
-   in structrual_comptypes.  */
+/* Nonzero if we are inside spec_hasher::equal, which affects
+   comparison of PARM_DECLs in cp_tree_equal.  */
 extern int comparing_specializations;
 
+/* Nonzero if we want different dependent aliases to compare as unequal.
+   FIXME we should always do this except during deduction/ordering.  */
+extern int comparing_dependent_aliases;
+
 /* In parser.c.  */
 
 /* Nonzero if we are parsing an unevaluated operand: an operand to
@@ -5370,9 +5507,10 @@ class cp_evaluated
 public:
   int uneval;
   int inhibit;
-  cp_evaluated ()
+  cp_evaluated (bool reset = true)
     : uneval(cp_unevaluated_operand), inhibit(c_inhibit_evaluation_warnings)
-  { cp_unevaluated_operand = c_inhibit_evaluation_warnings = 0; }
+  { if (reset)
+      cp_unevaluated_operand = c_inhibit_evaluation_warnings = 0; }
   ~cp_evaluated ()
   { cp_unevaluated_operand = uneval;
     c_inhibit_evaluation_warnings = inhibit; }
@@ -5403,6 +5541,14 @@ public:
   hash_map<tree, tree> *saved;
 };
 
+/* Entry in the specialization hash table.  */
+struct GTY((for_user)) spec_entry
+{
+  tree tmpl;  /* The general template this is a specialization of.  */
+  tree args;  /* The args for this (maybe-partial) specialization.  */
+  tree spec;  /* The specialization itself.  */
+};
+
 /* in class.c */
 
 extern int current_class_depth;
@@ -5509,6 +5655,10 @@ extern GTY(()) tree static_aggregates;
 /* Likewise, for thread local storage.  */
 extern GTY(()) tree tls_aggregates;
 
+/* A hash-map mapping from variable decls to the dynamic initializer for
+   the decl.  This is currently only used by OpenMP.  */
+extern GTY(()) decl_tree_map *dynamic_initializers;
+
 enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, TYPENAME_FLAG };
 
 /* These are uses as bits in flags passed to various functions to
@@ -5800,6 +5950,9 @@ enum ovl_op_code {
   OVL_OP_MAX
 };
 
+/* Make sure it fits in lang_decl_fn::ovl_op_code. */
+STATIC_ASSERT (OVL_OP_MAX < (1 << 6));
+
 struct GTY(()) ovl_op_info_t {
   /* The IDENTIFIER_NODE for the operator.  */
   tree identifier;
@@ -6110,6 +6263,13 @@ struct GTY((chain_next ("%h.next"))) tinst_level {
      arguments.  */
   tree tldcl, targs;
 
+  /* For modules we need to know (a) the modules on the path of
+     instantiation and (b) the transitive imports along that path.
+     Note that these two bitmaps may be inherited from NEXT, if this
+     decl is in the same module as NEXT (or has no new information).  */
+  bitmap path;
+  bitmap visible;
+
  private:
   /* Return TRUE iff the original node is a split list.  */
   bool split_list_p () const { return targs; }
@@ -6205,6 +6365,7 @@ extern cp_parameter_declarator *no_parameters;
 
 /* Various dump ids.  */
 extern int class_dump_id;
+extern int module_dump_id;
 extern int raw_dump_id;
 
 /* in call.c */
@@ -6242,6 +6403,13 @@ extern tree build_new_op                 (const op_location_t &,
                                                 enum tree_code,
                                                 int, tree, tree, tree, tree *,
                                                 tsubst_flags_t);
+/* Wrapper that leaves out the usually-null op3 and overload parms.  */
+inline tree build_new_op (const op_location_t &loc, enum tree_code code,
+                         int flags, tree arg1, tree arg2,
+                         tsubst_flags_t complain)
+{
+  return build_new_op (loc, code, flags, arg1, arg2, NULL_TREE, NULL, complain);
+}
 extern tree build_op_call                      (tree, vec<tree, va_gc> **,
                                                 tsubst_flags_t);
 extern bool aligned_allocation_fn_p            (tree);
@@ -6293,7 +6461,8 @@ class access_failure_info
   tree m_diag_decl;
 };
 
-extern void complain_about_access              (tree, tree, bool);
+extern void complain_about_access              (tree, tree, tree, bool,
+                                                access_kind);
 extern void push_defarg_context                        (tree);
 extern void pop_defarg_context                 (void);
 extern tree convert_default_arg                        (tree, tree, tree, int,
@@ -6330,7 +6499,8 @@ extern bool is_std_init_list                      (tree);
 extern bool is_list_ctor                       (tree);
 extern void validate_conversion_obstack                (void);
 extern void mark_versions_used                 (tree);
-extern bool unsafe_return_slot_p               (tree);
+extern int unsafe_return_slot_p                        (tree);
+extern bool make_safe_copy_elision             (tree, tree);
 extern bool cp_warn_deprecated_use             (tree, tsubst_flags_t = tf_warning_or_error);
 extern void cp_warn_deprecated_use_scopes      (tree);
 extern tree get_function_version_dispatcher    (tree);
@@ -6343,6 +6513,7 @@ extern tree build_base_path                       (enum tree_code, tree,
 extern tree convert_to_base                    (tree, tree, bool, bool,
                                                 tsubst_flags_t);
 extern tree convert_to_base_statically         (tree, tree);
+extern bool is_empty_base_ref                  (tree);
 extern tree build_vtbl_ref                     (tree, tree);
 extern tree build_vfn_ref                      (tree, tree);
 extern tree get_vtable_decl                    (tree, int);
@@ -6371,6 +6542,7 @@ extern int same_signature_p                       (const_tree, const_tree);
 extern tree lookup_vfn_in_binfo                        (tree, tree);
 extern void maybe_add_class_template_decl_list (tree, tree, int);
 extern void unreverse_member_declarations      (tree);
+extern bool is_empty_field                     (tree);
 extern void invalidate_class_lookup_cache      (void);
 extern void maybe_note_name_used_in_class      (tree, tree);
 extern void note_name_declared_in_class                (tree, tree);
@@ -6397,7 +6569,6 @@ extern bool type_has_constexpr_destructor (tree);
 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 bool classtype_has_non_deleted_copy_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);
@@ -6411,6 +6582,7 @@ extern void check_abi_tags                        (tree);
 extern tree missing_abi_tags                   (tree);
 extern void fixup_type_variants                        (tree);
 extern void fixup_attribute_variants           (tree);
+extern void build_cdtor_clones                         (tree, bool, bool, bool);
 extern void clone_cdtor                                (tree, bool);
 extern tree copy_operator_fn                   (tree, tree_code code);
 extern void adjust_clone_args                  (tree);
@@ -6475,10 +6647,13 @@ extern bool check_omp_return                    (void);
 extern tree make_typename_type                 (tree, tree, enum tag_types, tsubst_flags_t);
 extern tree build_typename_type                        (tree, tree, tree, tag_types);
 extern tree make_unbound_class_template                (tree, tree, tree, tsubst_flags_t);
+extern tree make_unbound_class_template_raw    (tree, tree, tree);
+extern unsigned push_abi_namespace             (tree node = abi_node);
+extern void pop_abi_namespace                  (unsigned flags,
+                                                tree node = abi_node);
 extern tree build_library_fn_ptr               (const char *, tree, int);
 extern tree build_cp_library_fn_ptr            (const char *, tree, int);
 extern tree push_library_fn                    (tree, tree, tree, int);
-extern tree push_void_library_fn               (tree, tree, int);
 extern tree push_throw_library_fn              (tree, tree);
 extern void warn_misplaced_attr_for_class_type  (location_t location,
                                                 tree class_type);
@@ -6549,6 +6724,7 @@ extern void initialize_artificial_var             (tree, vec<constructor_elt, va_gc> *);
 extern tree check_var_type                     (tree, tree, location_t);
 extern tree reshape_init                        (tree, tree, tsubst_flags_t);
 extern tree next_initializable_field (tree);
+extern tree first_field                                (const_tree);
 extern tree fndecl_declared_return_type                (tree);
 extern bool undeduced_auto_decl                        (tree);
 extern bool require_deduced_type               (tree, tsubst_flags_t = tf_warning_or_error);
@@ -6695,7 +6871,7 @@ extern void mark_exp_read                 (tree);
 extern int is_friend                           (tree, tree);
 extern void make_friend_class                  (tree, tree, bool);
 extern void add_friend                         (tree, tree, bool);
-extern tree do_friend                          (tree, tree, tree, tree,
+extern tree do_friend                          (tree, tree, tree,
                                                 enum overload_flags, bool);
 
 extern void set_global_friend                  (tree);
@@ -6707,7 +6883,6 @@ extern void emit_mem_initializers         (tree);
 extern tree build_aggr_init                    (tree, tree, int,
                                                  tsubst_flags_t);
 extern int is_class_type                       (tree, int);
-extern tree get_type_value                     (tree);
 extern tree build_zero_init                    (tree, tree, bool);
 extern tree build_value_init                   (tree, tsubst_flags_t);
 extern tree build_value_init_noctor            (tree, tsubst_flags_t);
@@ -6749,6 +6924,8 @@ extern tree unqualified_fn_lookup_error           (cp_expr);
 extern tree make_conv_op_name                  (tree);
 extern tree build_lang_decl                    (enum tree_code, tree, tree);
 extern tree build_lang_decl_loc                        (location_t, enum tree_code, tree, tree);
+extern bool maybe_add_lang_decl_raw            (tree, bool decomp_p);
+extern bool maybe_add_lang_type_raw            (tree);
 extern void retrofit_lang_decl                 (tree);
 extern void fit_decomposition_lang_decl                (tree, tree);
 extern tree copy_decl                          (tree CXX_MEM_STAT_INFO);
@@ -6760,6 +6937,10 @@ extern void set_identifier_kind                  (tree, cp_identifier_kind);
 extern bool cxx_init                           (void);
 extern void cxx_finish                         (void);
 extern bool in_main_input_context              (void);
+extern uintptr_t module_token_pre (cpp_reader *, const cpp_token *, uintptr_t);
+extern uintptr_t module_token_cdtor (cpp_reader *, uintptr_t);
+extern uintptr_t module_token_lang (int type, int keyword, tree value,
+                                   location_t, uintptr_t);
 
 /* in method.c */
 extern void init_method                                (void);
@@ -6774,7 +6955,7 @@ extern bool is_xible                              (enum tree_code, tree, tree);
 extern tree get_defaulted_eh_spec              (tree, tsubst_flags_t = tf_warning_or_error);
 extern bool maybe_explain_implicit_delete      (tree);
 extern void explain_implicit_non_constexpr     (tree);
-extern void deduce_inheriting_ctor             (tree);
+extern bool deduce_inheriting_ctor             (tree);
 extern bool decl_remember_implicit_trigger_p   (tree);
 extern void synthesize_method                  (tree);
 extern tree lazily_declare_fn                  (special_function_kind,
@@ -6786,6 +6967,7 @@ extern tree get_copy_ctor                 (tree, tsubst_flags_t);
 extern tree get_copy_assign                    (tree);
 extern tree get_default_ctor                   (tree);
 extern tree get_dtor                           (tree, tsubst_flags_t);
+extern tree build_stub_object                  (tree);
 extern tree strip_inheriting_ctors             (tree);
 extern tree inherited_ctor_binfo               (tree);
 extern bool base_ctor_omit_inherited_parms     (tree);
@@ -6793,6 +6975,101 @@ extern bool ctor_omit_inherited_parms           (tree);
 extern tree locate_ctor                                (tree);
 extern tree implicitly_declare_fn               (special_function_kind, tree,
                                                 bool, tree, tree);
+/* In module.cc  */
+class module_state; /* Forward declare.  */
+inline bool modules_p () { return flag_modules != 0; }
+
+/* The kind of module or part thereof that we're in.  */
+enum module_kind_bits
+{
+  MK_MODULE = 1 << 0,     /* This TU is a module.  */
+  MK_GLOBAL = 1 << 1,     /* Entities are in the global module.  */
+  MK_INTERFACE = 1 << 2,  /* This TU is an interface.  */
+  MK_PARTITION = 1 << 3,  /* This TU is a partition.  */
+  MK_EXPORTING = 1 << 4,  /* We are in an export region.  */
+};
+
+/* We do lots of bit-manipulation, so an unsigned is easier.  */
+extern unsigned module_kind;
+
+/*  MK_MODULE & MK_GLOBAL have the following combined meanings:
+ MODULE GLOBAL
+   0     0     not a module
+   0     1     GMF of named module (we've not yet seen module-decl)
+   1     0     purview of named module
+   1     1     header unit.   */
+
+inline bool module_purview_p ()
+{ return module_kind & MK_MODULE; }
+inline bool global_purview_p ()
+{ return module_kind & MK_GLOBAL; }
+
+inline bool not_module_p ()
+{ return (module_kind & (MK_MODULE | MK_GLOBAL)) == 0; }
+inline bool named_module_p ()
+{ /* This is a named module if exactly one of MODULE and GLOBAL is
+     set.  */
+  /* The divides are constant shifts!  */
+  return ((module_kind / MK_MODULE) ^ (module_kind / MK_GLOBAL)) & 1;
+}
+inline bool header_module_p ()
+{ return (module_kind & (MK_MODULE | MK_GLOBAL)) == (MK_MODULE | MK_GLOBAL); }
+inline bool named_module_purview_p ()
+{ return (module_kind & (MK_MODULE | MK_GLOBAL)) == MK_MODULE; }
+inline bool module_interface_p ()
+{ return module_kind & MK_INTERFACE; }
+inline bool module_partition_p ()
+{ return module_kind & MK_PARTITION; }
+inline bool module_has_cmi_p ()
+{ return module_kind & (MK_INTERFACE | MK_PARTITION); }
+
+/* We're currently exporting declarations.  */
+inline bool module_exporting_p ()
+{ return module_kind & MK_EXPORTING; }
+
+extern module_state *get_module (tree name, module_state *parent = NULL,
+                                bool partition = false);
+extern bool module_may_redeclare (tree decl);
+
+extern int module_initializer_kind ();
+extern void module_add_import_initializers ();
+
+/* Where the namespace-scope decl was originally declared.  */
+extern void set_originating_module (tree, bool friend_p = false);
+extern tree get_originating_module_decl (tree) ATTRIBUTE_PURE;
+extern int get_originating_module (tree, bool for_mangle = false) ATTRIBUTE_PURE;
+extern unsigned get_importing_module (tree, bool = false) ATTRIBUTE_PURE;
+
+/* Where current instance of the decl got declared/defined/instantiated.  */
+extern void set_instantiating_module (tree);
+extern void set_defining_module (tree);
+extern void maybe_attach_decl (tree ctx, tree decl);
+
+extern void mangle_module (int m, bool include_partition);
+extern void mangle_module_fini ();
+extern void lazy_load_binding (unsigned mod, tree ns, tree id,
+                              binding_slot *bslot);
+extern void lazy_load_pendings (tree decl);
+extern module_state *preprocess_module (module_state *, location_t,
+                                       bool in_purview, 
+                                       bool is_import, bool export_p,
+                                       cpp_reader *reader);
+extern void preprocessed_module (cpp_reader *reader);
+extern void import_module (module_state *, location_t, bool export_p,
+                          tree attr, cpp_reader *);
+extern void declare_module (module_state *, location_t, bool export_p,
+                           tree attr, cpp_reader *);
+extern void init_modules (cpp_reader *);
+extern void fini_modules ();
+extern void maybe_check_all_macros (cpp_reader *);
+extern void finish_module_processing (cpp_reader *);
+extern char const *module_name (unsigned, bool header_ok);
+extern bitmap get_import_bitmap ();
+extern bitmap visible_instantiation_path (bitmap *);
+extern void module_begin_main_file (cpp_reader *, line_maps *,
+                                   const line_map_ordinary *);
+extern void module_preprocess_options (cpp_reader *);
+extern bool handle_module_option (unsigned opt, const char *arg, int value);
 
 /* In optimize.c */
 extern bool maybe_clone_body                   (tree);
@@ -6811,6 +7088,7 @@ extern void maybe_show_extern_c_location (void);
 extern bool literal_integer_zerop (const_tree);
 
 /* in pt.c */
+extern tree canonical_type_parameter           (tree);
 extern void push_access_scope                  (tree);
 extern void pop_access_scope                   (tree);
 extern bool check_template_shadow              (tree);
@@ -6899,7 +7177,6 @@ extern tree get_template_info                     (const_tree);
 extern int template_class_depth                        (tree);
 extern int is_specialization_of                        (tree, tree);
 extern bool is_specialization_of_friend                (tree, tree);
-extern tree get_pattern_parm                   (tree, tree);
 extern int comp_template_args                  (tree, tree, tree * = NULL,
                                                 tree * = NULL, bool = false);
 extern int template_args_equal                  (tree, tree, bool = false);
@@ -6973,7 +7250,6 @@ bool template_template_parameter_p                (const_tree);
 bool template_type_parameter_p                  (const_tree);
 extern bool primary_template_specialization_p   (const_tree);
 extern tree get_primary_template_innermost_parameters  (const_tree);
-extern tree get_template_parms_at_level (tree, int);
 extern tree get_template_innermost_arguments   (const_tree);
 extern tree get_template_argument_pack_elems   (const_tree);
 extern tree get_function_template_decl         (const_tree);
@@ -6994,6 +7270,16 @@ extern bool copy_guide_p                 (const_tree);
 extern bool template_guide_p                   (const_tree);
 extern bool builtin_guide_p                    (const_tree);
 extern void store_explicit_specifier           (tree, tree);
+extern void walk_specializations               (bool,
+                                                void (*)(bool, spec_entry *,
+                                                         void *),
+                                                void *);
+extern tree match_mergeable_specialization     (bool is_decl, spec_entry *);
+extern unsigned get_mergeable_specialization_flags (tree tmpl, tree spec);
+extern void add_mergeable_specialization        (bool is_decl, bool is_alias,
+                                                spec_entry *,
+                                                tree outer, unsigned);
+extern tree add_to_template_args               (tree, tree);
 extern tree add_outermost_template_args                (tree, tree);
 extern tree add_extra_args                     (tree, tree);
 extern tree build_extra_args                   (tree, tree, tsubst_flags_t);
@@ -7004,6 +7290,7 @@ extern GTY(()) vec<tree, va_gc> *unemitted_tinfo_decls;
 
 extern void init_rtti_processing               (void);
 extern tree build_typeid                       (tree, tsubst_flags_t);
+extern tree get_tinfo_decl_direct              (tree, tree, int);
 extern tree get_tinfo_decl                     (tree);
 extern tree get_typeid                         (tree, tsubst_flags_t);
 extern tree build_headof                       (tree);
@@ -7011,8 +7298,12 @@ extern tree build_dynamic_cast                   (location_t, tree, tree,
                                                 tsubst_flags_t);
 extern void emit_support_tinfos                        (void);
 extern bool emit_tinfo_decl                    (tree);
+extern unsigned get_pseudo_tinfo_index         (tree);
+extern tree get_pseudo_tinfo_type              (unsigned);
+extern tree build_if_nonnull                   (tree, tree, tsubst_flags_t);
 
 /* in search.c */
+extern tree get_parent_with_private_access     (tree decl, tree binfo);
 extern bool accessible_base_p                  (tree, tree, bool);
 extern tree lookup_base                         (tree, tree, base_access,
                                                 base_kind *, tsubst_flags_t);
@@ -7051,7 +7342,7 @@ extern tree adjust_result_of_qualified_name_lookup
                                                (tree, tree, tree);
 extern tree copied_binfo                       (tree, tree);
 extern tree original_binfo                     (tree, tree);
-extern int shared_member_p                     (tree);
+extern bool shared_member_p                    (tree);
 extern bool any_dependent_bases_p (tree = current_nonlambda_class_type ());
 extern bool maybe_check_overriding_exception_spec (tree, tree);
 
@@ -7261,7 +7552,6 @@ extern tree build_lambda_expr                   (void);
 extern tree build_lambda_object                        (tree);
 extern tree begin_lambda_type                   (tree);
 extern tree lambda_capture_field_type          (tree, bool, bool);
-extern tree lambda_return_type                 (tree);
 extern tree lambda_proxy_type                  (tree);
 extern tree lambda_function                    (tree);
 extern void apply_deduced_return_type           (tree, tree);
@@ -7291,12 +7581,16 @@ extern tree finish_builtin_launder              (location_t, tree,
                                                 tsubst_flags_t);
 extern tree cp_build_vec_convert               (tree, location_t, tree,
                                                 tsubst_flags_t);
+extern tree cp_build_bit_cast                  (location_t, tree, tree,
+                                                tsubst_flags_t);
 extern void start_lambda_scope                 (tree);
 extern void record_lambda_scope                        (tree);
 extern void record_null_lambda_scope           (tree);
 extern void finish_lambda_scope                        (void);
 extern tree start_lambda_function              (tree fn, tree lambda_expr);
 extern void finish_lambda_function             (tree body);
+extern bool regenerated_lambda_fn_p            (tree);
+extern tree most_general_lambda                        (tree);
 
 /* in tree.c */
 extern int cp_tree_operand_length              (const_tree);
@@ -7358,7 +7652,7 @@ 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);
-extern tree build_cplus_array_type             (tree, tree);
+extern tree build_cplus_array_type             (tree, tree, int is_dep = -1);
 extern tree build_array_of_n_type              (tree, int);
 extern bool array_of_runtime_bound_p           (tree);
 extern bool vla_type_p                         (tree);
@@ -7369,6 +7663,7 @@ extern tree hash_tree_cons                        (tree, tree, tree);
 extern tree hash_tree_chain                    (tree, tree);
 extern tree build_qualified_name               (tree, tree, tree, bool);
 extern tree build_ref_qualified_type           (tree, cp_ref_qualifier);
+extern tree make_binding_vec                   (tree, unsigned clusters CXX_MEM_STAT_INFO);
 inline tree ovl_first                          (tree) ATTRIBUTE_PURE;
 extern tree ovl_make                           (tree fn,
                                                 tree next = NULL_TREE);
@@ -7396,6 +7691,7 @@ extern tree bind_template_template_parm           (tree, tree);
 extern tree array_type_nelts_total             (tree);
 extern tree array_type_nelts_top               (tree);
 extern bool array_of_unknown_bound_p           (const_tree);
+extern bool source_location_current_p          (tree);
 extern tree break_out_target_exprs             (tree, bool = false);
 extern tree build_ctor_subob_ref               (tree, tree, tree);
 extern tree replace_placeholders               (tree, tree, bool * = NULL);
@@ -7592,7 +7888,7 @@ 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 genericize_spaceship               (location_t, tree, tree, tree);
 extern tree cp_build_binary_op                  (const op_location_t &,
                                                 enum tree_code, tree, tree,
                                                 tsubst_flags_t);
@@ -7678,6 +7974,7 @@ extern tree split_nonconstant_init                (tree, tree);
 extern bool check_narrowing                    (tree, tree, tsubst_flags_t,
                                                 bool = false);
 extern bool ordinary_char_type_p               (tree);
+extern bool array_string_literal_compatible_p  (tree, tree);
 extern tree digest_init                                (tree, tree, tsubst_flags_t);
 extern tree digest_init_flags                  (tree, tree, int, tsubst_flags_t);
 extern tree digest_nsdmi_init                  (tree, tree, tsubst_flags_t);
@@ -7709,6 +8006,9 @@ extern tree mangle_template_parm_object           (tree);
 extern char *get_mangled_vtable_map_var_name    (tree);
 extern bool mangle_return_type_p               (tree);
 extern tree mangle_decomp                      (tree, vec<tree> &);
+extern void mangle_module_substitution         (int);
+extern void mangle_identifier                  (char, tree);
+extern tree mangle_module_global_init          (int);
 
 /* in dump.c */
 extern bool cp_dump_tree                       (void *, tree);
@@ -7804,7 +8104,6 @@ extern tree current_template_constraints  (void);
 extern tree associate_classtype_constraints     (tree);
 extern tree build_constraints                   (tree, tree);
 extern tree maybe_substitute_reqs_for          (tree, const_tree);
-extern tree get_template_head_requirements     (tree);
 extern tree get_trailing_function_requirements (tree);
 extern tree get_shorthand_constraints           (tree);
 
@@ -7830,8 +8129,8 @@ extern tree finish_simple_requirement           (location_t, tree);
 extern tree finish_type_requirement             (location_t, tree);
 extern tree finish_compound_requirement         (location_t, tree, tree, bool);
 extern tree finish_nested_requirement           (location_t, tree);
-extern void check_constrained_friend            (tree, tree);
 extern tree tsubst_requires_expr                (tree, tree, tsubst_flags_t, tree);
+extern tree evaluate_requires_expr             (tree);
 extern tree tsubst_constraint                   (tree, tree, tsubst_flags_t, tree);
 extern tree tsubst_constraint_info              (tree, tree, tsubst_flags_t, tree);
 extern tree tsubst_parameter_mapping           (tree, tree, tsubst_flags_t, tree);
@@ -7846,16 +8145,13 @@ struct processing_constraint_expression_sentinel
 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 tree evaluate_concept_check              (tree);
+extern bool constraints_satisfied_p            (tree, tree = NULL_TREE);
 extern bool* lookup_subsumption_result          (tree, tree);
 extern bool save_subsumption_result             (tree, tree, bool);
 extern tree find_template_parameters           (tree, tree);
 extern bool equivalent_constraints              (tree, tree);
 extern bool equivalently_constrained            (tree, tree);
-extern bool subsumes_constraints                (tree, tree);
 extern bool strictly_subsumes                  (tree, tree);
 extern bool weakly_subsumes                    (tree, tree);
 extern int more_constrained                     (tree, tree);
@@ -7866,6 +8162,8 @@ extern hashval_t iterative_hash_constraint      (tree, hashval_t);
 extern hashval_t hash_atomic_constraint         (tree);
 extern void diagnose_constraints                (location_t, tree, tree);
 
+extern void note_failed_type_completion_for_satisfaction (tree);
+
 /* A structural hasher for ATOMIC_CONSTRs.  */
 
 struct atom_hasher : default_hash_traits<tree>
@@ -7936,7 +8234,7 @@ extern tree maybe_fold_non_dependent_expr (tree,
                                                 tsubst_flags_t = tf_warning_or_error);
 extern tree fold_non_dependent_init            (tree,
                                                 tsubst_flags_t = tf_warning_or_error,
-                                                bool = false);
+                                                bool = false, tree = NULL_TREE);
 extern tree fold_simple                                (tree);
 extern bool reduced_constant_expression_p       (tree);
 extern bool is_instantiation_of_constexpr       (tree);
@@ -7969,6 +8267,8 @@ struct uid_sensitive_constexpr_evaluation_checker
   bool evaluation_restricted_p () const;
 };
 
+void cp_tree_c_finish_parsing ();
+
 /* In cp-ubsan.c */
 extern void cp_ubsan_maybe_instrument_member_call (tree);
 extern void cp_ubsan_instrument_member_accesses (tree *);
@@ -8003,14 +8303,16 @@ type_unknown_p (const_tree expr)
 inline hashval_t
 named_decl_hash::hash (const value_type decl)
 {
-  tree name = OVL_NAME (decl);
+  tree name = (TREE_CODE (decl) == BINDING_VECTOR
+              ? BINDING_VECTOR_NAME (decl) : OVL_NAME (decl));
   return name ? IDENTIFIER_HASH_VALUE (name) : 0;
 }
 
 inline bool
 named_decl_hash::equal (const value_type existing, compare_type candidate)
 {
-  tree name = OVL_NAME (existing);
+  tree name = (TREE_CODE (existing) == BINDING_VECTOR
+              ? BINDING_VECTOR_NAME (existing) : OVL_NAME (existing));
   return candidate == name;
 }
 
@@ -8145,7 +8447,7 @@ set_implicit_rvalue_p (tree ot)
 inline bool
 is_constrained_auto (const_tree t)
 {
-  return is_auto (t) && PLACEHOLDER_TYPE_CONSTRAINTS (t);
+  return is_auto (t) && PLACEHOLDER_TYPE_CONSTRAINTS_INFO (t);
 }
 
 /* RAII class to push/pop class scope T; if T is not a class, do nothing.  */
This page took 0.073238 seconds and 5 git commands to generate.