diff options
author | Jason Merrill <jason@redhat.com> | 2022-04-01 09:01:30 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-04-01 10:00:26 -0400 |
commit | 86d8e0c0652ef5236a460b75c25e4f7093cc0651 (patch) | |
tree | 6685db841ca78121ca5adaa70b114fe832462e24 /gcc/cp/class.cc | |
parent | 1a172da8a3f3625d6d35675e604678ab0154bef7 (diff) | |
download | gcc-86d8e0c0652ef5236a460b75c25e4f7093cc0651.zip gcc-86d8e0c0652ef5236a460b75c25e4f7093cc0651.tar.gz gcc-86d8e0c0652ef5236a460b75c25e4f7093cc0651.tar.bz2 |
Revert "c++: delayed parse DMI [PR96645]"
The breakage from r12-7804 (in WebKit, particularly) is more of a can of
worms than I think we can address in GCC 12, so let's return to the GCC 11
status quo for now and try again in stage 1.
I think the change was correct for the current standard, but the standard
needs a fix in this area; this is CWG issue 2335.
PR c++/96645
This reverts commits r12-7804 and r12-7929.
Diffstat (limited to 'gcc/cp/class.cc')
-rw-r--r-- | gcc/cp/class.cc | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc index c75b889..40e1714 100644 --- a/gcc/cp/class.cc +++ b/gcc/cp/class.cc @@ -5415,11 +5415,10 @@ type_has_user_provided_or_explicit_constructor (tree t) /* Returns true iff class T has a non-user-provided (i.e. implicitly declared or explicitly defaulted in the class body) default - constructor. If SYNTH, only return true if it hasn't been - implicitly defined yet. */ + constructor. */ -static bool -type_has_non_user_provided_default_constructor_1 (tree t, bool synth) +bool +type_has_non_user_provided_default_constructor (tree t) { if (!TYPE_HAS_DEFAULT_CONSTRUCTOR (t)) return false; @@ -5432,28 +5431,12 @@ type_has_non_user_provided_default_constructor_1 (tree t, bool synth) if (TREE_CODE (fn) == FUNCTION_DECL && default_ctor_p (fn) && !user_provided_p (fn)) - { - if (synth) - return !DECL_INITIAL (fn); - return true; - } + return true; } return false; } -bool -type_has_non_user_provided_default_constructor (tree t) -{ - return type_has_non_user_provided_default_constructor_1 (t, false); -} - -bool -type_has_default_ctor_to_be_synthesized (tree t) -{ - return type_has_non_user_provided_default_constructor_1 (t, true); -} - /* TYPE is being used as a virtual base, and has a non-trivial move assignment. Return true if this is due to there being a user-provided move assignment in TYPE or one of its subobjects; if there isn't, then |