[gcc r14-7702] gccrs: ast: Add explicit default copy constructor
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 17:55:06 GMT 2024
https://gcc.gnu.org/g:5373b8e66cc66e0691e60ec7a2ea633ca7e5a9d1
commit r14-7702-g5373b8e66cc66e0691e60ec7a2ea633ca7e5a9d1
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Jun 27 14:03:16 2023 +0200
gccrs: ast: Add explicit default copy constructor
Add explicit default copy/move constructor to identifiers.
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add default constructors.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diff:
---
gcc/rust/ast/rust-ast.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index a4caee7237d..e097a21d1cf 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -39,6 +39,11 @@ public:
: ident (ident), node_id (Analysis::Mappings::get ()->get_next_node_id ())
{}
+ Identifier (const Identifier &) = default;
+ Identifier (Identifier &&) = default;
+ Identifier &operator= (const Identifier &) = default;
+ Identifier &operator= (Identifier &&) = default;
+
NodeId get_node_id () const { return node_id; }
const std::string &as_string () const { return ident; }
More information about the Gcc-cvs
mailing list