P0490R0 GB 20: decomposition declaration should commit to tuple interpretation early
authorJakub Jelinek <jakub@redhat.com>
Thu, 15 Dec 2016 20:42:11 +0000 (21:42 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 15 Dec 2016 20:42:11 +0000 (21:42 +0100)
commitce7888dae8bfce7f3049727d31d8b7ae4e83c88d
tree5401744b27ceed5772638cbca941d068a370aa55
parent2a810dedce593e9b015a051a0dfb36dfb7e563bf
P0490R0 GB 20: decomposition declaration should commit to tuple interpretation early

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.

From-SVN: r243724
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/decomp10.C