diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-10-12 18:56:53 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-10-12 18:56:53 +0000 |
commit | d89dac3602ea7fa8b29d55fb6f945181fb16f427 (patch) | |
tree | 98279deba3988a674efe1825b877c6762b3596ce | |
parent | 83d502cf40077b7115c8e6342218186223a42474 (diff) | |
download | gcc-d89dac3602ea7fa8b29d55fb6f945181fb16f427.zip gcc-d89dac3602ea7fa8b29d55fb6f945181fb16f427.tar.gz gcc-d89dac3602ea7fa8b29d55fb6f945181fb16f427.tar.bz2 |
[C++ PATCH] cp_expr tweak and delete unused enumerations
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00784.html
* cp-tree.h (cp_expr): Add const operator * and operator->
accessors.
(cp_tree_node_structure_enum): Delete TS_CP_BINDING,
TS_CP_WRAPPER, LAST_TS_CP_ENUM.
From-SVN: r253693
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7174115..3abf794 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2017-10-12 Nathan Sidwell <nathan@acm.org> + + * cp-tree.h (cp_expr): Add const operator * and operator-> + accessors. + (cp_tree_node_structure_enum): Delete TS_CP_BINDING, + TS_CP_WRAPPER, LAST_TS_CP_ENUM. + 2017-10-12 David Malcolm <dmalcolm@redhat.com> * parser.c (get_required_cpp_ttype): New function. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 4fb2dc8..dc98dd8 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -65,7 +65,9 @@ public: /* Implicit conversions to tree. */ operator tree () const { return m_value; } tree & operator* () { return m_value; } + tree operator* () const { return m_value; } tree & operator-> () { return m_value; } + tree operator-> () const { return m_value; } tree get_value () const { return m_value; } location_t get_location () const { return m_loc; } @@ -1467,11 +1469,9 @@ enum cp_tree_node_structure_enum { TS_CP_IDENTIFIER, TS_CP_TPI, TS_CP_PTRMEM, - TS_CP_BINDING, TS_CP_OVERLOAD, TS_CP_BASELINK, TS_CP_TEMPLATE_DECL, - TS_CP_WRAPPER, TS_CP_DEFAULT_ARG, TS_CP_DEFERRED_NOEXCEPT, TS_CP_STATIC_ASSERT, @@ -1480,8 +1480,7 @@ enum cp_tree_node_structure_enum { TS_CP_LAMBDA_EXPR, TS_CP_TEMPLATE_INFO, TS_CP_CONSTRAINT_INFO, - TS_CP_USERDEF_LITERAL, - LAST_TS_CP_ENUM + TS_CP_USERDEF_LITERAL }; /* The resulting tree type. */ |