P0490R0 GB 20: decomposition declaration should commit to tuple
commitbbd14d5c6e6158d1c44078d6ac76ac5891f0bfd9
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Dec 2016 20:42:11 +0000 (15 20:42 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Dec 2016 20:42:11 +0000 (15 20:42 +0000)
tree5401744b27ceed5772638cbca941d068a370aa55
parent4b0d05b1a4a97f150bda77b5cdc5f9c7b8255ca9
P0490R0 GB 20: decomposition declaration should commit to tuple
interpretation early
* decl.c (get_tuple_size): Make static.  If inst is error_mark_node
or non-complete type, return NULL_TREE, otherwise if
lookup_qualified_name fails or doesn't fold into INTEGER_CST, return
error_mark_node.
(get_tuple_element_type, get_tuple_decomp_init): Make static.
(cp_finish_decomp): Pass LOC to get_tuple_size.  If it returns
error_mark_node, complain and fail.

* g++.dg/cpp1z/decomp10.C (f1): Adjust expected diagnostics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243724 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/decomp10.C