diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-06-27 17:27:49 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-06-27 17:27:49 +0000 |
commit | b2cf76f3a58d065122d2ae94bf55510551ff27f4 (patch) | |
tree | 37e8225773157de7dee0c8d54f30a477abf6d3f7 /gcc/cp/parser.c | |
parent | 68fe5f441e9ea89a48a240ff5fcc05cf0146af7d (diff) | |
download | gcc-b2cf76f3a58d065122d2ae94bf55510551ff27f4.zip gcc-b2cf76f3a58d065122d2ae94bf55510551ff27f4.tar.gz gcc-b2cf76f3a58d065122d2ae94bf55510551ff27f4.tar.bz2 |
cp-tree.h (CLASSTYPE_DESTRUCTORS): Rename to ...
* cp-tree.h (CLASSTYPE_DESTRUCTORS): Rename to ...
(CLASSTYPE_DESTRUCTOR): ... this.
* class.c (accessible_nvdtor_p)
maybe_warn_about_overly_private_class,
add_implicitly_declared_members,
clone_constructors_and_destructors, type_has_virtual_destructor):
Adjust for CLASSTYPE_DESTRUCTOR.
(deduce_noexcept_on_destructors): Absorb into ...
(check_bases_and_members): ... here.
* except.c (dtor_nothrow): Adjust for CLASSTYPE_DESTRUCTOR.
* init.c (build_delete): Likewise.
* parser.c (cp_parser_lookup_name): Likewise.
* pt.c (check_explicit_specialization): Likewise.
* rtti.c (emit_support_tinfos): Likewise.
* search.c (lookup_fnfields_idx_nolazy): Likewise.
(--This line, and those below, will be ignored--
M cp/cp-tree.h
M cp/search.c
M cp/init.c
M cp/class.c
M cp/rtti.c
M cp/except.c
M cp/ChangeLog
M cp/pt.c
M cp/parser.c
From-SVN: r249701
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 573b97a..2ff6afd 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -25679,12 +25679,14 @@ cp_parser_lookup_name (cp_parser *parser, tree name, /* If that's not a class type, there is no destructor. */ if (!type || !CLASS_TYPE_P (type)) return error_mark_node; + if (CLASSTYPE_LAZY_DESTRUCTOR (type)) lazily_declare_fn (sfk_destructor, type); - if (!CLASSTYPE_DESTRUCTORS (type)) - return error_mark_node; - /* If it was a class type, return the destructor. */ - return CLASSTYPE_DESTRUCTORS (type); + + if (tree dtor = CLASSTYPE_DESTRUCTOR (type)) + return dtor; + + return error_mark_node; } /* By this point, the NAME should be an ordinary identifier. If |