aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-11-15 00:22:28 -0500
committerJason Merrill <jason@gcc.gnu.org>2016-11-15 00:22:28 -0500
commit47e5d7ccf12c5d11abdd18e8e9089735e4fd3d05 (patch)
tree376f8789de74bf75a940c9583acaea031e9de6d6 /gcc/cp/tree.c
parenta274cc11ac675686a71aef82e2e734795d18f339 (diff)
downloadgcc-47e5d7ccf12c5d11abdd18e8e9089735e4fd3d05.zip
gcc-47e5d7ccf12c5d11abdd18e8e9089735e4fd3d05.tar.gz
gcc-47e5d7ccf12c5d11abdd18e8e9089735e4fd3d05.tar.bz2
Various C++17 decomposition fixes.
* tree.c (bitfield_p): New. * cp-tree.h: Declare it. * typeck.c (cxx_sizeof_expr, cxx_alignof_expr) (cp_build_addr_expr_1): Use it instead of DECL_C_BIT_FIELD. * decl.c (cp_finish_decomp): Look through reference. Always SET_DECL_DECOMPOSITION_P. * semantics.c (finish_decltype_type): Adjust decomposition handling. From-SVN: r242408
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index c595437..d1dd7c4 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -305,6 +305,14 @@ xvalue_p (const_tree ref)
return (lvalue_kind (ref) == clk_rvalueref);
}
+/* True if REF is a bit-field. */
+
+bool
+bitfield_p (const_tree ref)
+{
+ return (lvalue_kind (ref) & clk_bitfield);
+}
+
/* C++-specific version of stabilize_reference. */
tree