* cp-tree.h (cp_tree_c_finish_parsing): Declare.
* decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
* tree.c (cp_tree_c_finish_parsing): New function.
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 *);
perform_deferred_noexcept_checks ();
fini_constexpr ();
+ cp_tree_c_finish_parsing ();
clear_consteval_vfns (consteval_vtables);
/* The entire file is now complete. If requested, dump everything
return false;
}
\f
+/* Release memory we no longer need after parsing. */
+void
+cp_tree_c_finish_parsing ()
+{
+ if (previous_class_level)
+ invalidate_class_lookup_cache ();
+ deleted_copy_types = NULL;
+}
+\f
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
/* Complain that some language-specific thing hanging off a tree
node has been accessed improperly. */