aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-08-02 08:07:15 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-08-02 06:07:15 +0000
commit8e8e7af514344588ff3e3da25c0cb74c12dc6a0d (patch)
tree718561f6eba3620d15ed6284d1970991666ac69c /gcc/cp/decl.c
parent5bae71d1aaa211493c58d03037634a06064f59fa (diff)
downloadgcc-8e8e7af514344588ff3e3da25c0cb74c12dc6a0d.zip
gcc-8e8e7af514344588ff3e3da25c0cb74c12dc6a0d.tar.gz
gcc-8e8e7af514344588ff3e3da25c0cb74c12dc6a0d.tar.bz2
Mark DECL_SET_IS_OPERATOR_DELETE for user-provided delete operators.
2019-08-02 Martin Liska <mliska@suse.cz> * decl.c (grok_op_properties): Mark DECL_SET_IS_OPERATOR_DELETE for user-provided delete operators. 2019-08-02 Martin Liska <mliska@suse.cz> * g++.dg/cpp1y/new2.C: New test. From-SVN: r273996
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index a1ab5ca..e0102c0 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -13678,7 +13678,10 @@ grok_op_properties (tree decl, bool complain)
}
if (op_flags & OVL_OP_FLAG_DELETE)
- coerce_delete_type (decl, loc);
+ {
+ DECL_SET_IS_OPERATOR_DELETE (decl, true);
+ coerce_delete_type (decl, loc);
+ }
else
{
DECL_SET_IS_OPERATOR_NEW (decl, true);