This patch defines TYPE_REF_IS_LVALUE to determine if a type is a C++ lvalue reference.
gcc/ChangeLog: * tree.h (TYPE_REF_IS_LVALUE): Define. Signed-off-by: Ken Matsui <kmat...@gcc.gnu.org> --- gcc/tree.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/tree.h b/gcc/tree.h index 347e676e737..0b2cb894241 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1054,6 +1054,10 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, #define TYPE_REF_IS_RVALUE(NODE) \ (REFERENCE_TYPE_CHECK (NODE)->base.private_flag) +/* True if reference type NODE is a C++ lvalue reference. */ +#define TYPE_REF_IS_LVALUE(NODE) \ + (TYPE_REF_P (NODE) && !TYPE_REF_IS_RVALUE (NODE)) + /* Nonzero in a _DECL if the use of the name is defined as a deprecated feature by __attribute__((deprecated)). */ #define TREE_DEPRECATED(NODE) \ -- 2.41.0