aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-iterator.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-08-07 09:48:07 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2024-08-07 09:48:07 +0200
commit9426ce98ccb35a43b4f3e8ea14dcbf2f5de5dc48 (patch)
treed9d1e5a24a7277c697c33b88bb613fa43baf7933 /gcc/tree-iterator.cc
parent2cf89ae83225f932b226cd57ef2d083a59bcf8a3 (diff)
downloadgcc-9426ce98ccb35a43b4f3e8ea14dcbf2f5de5dc48.zip
gcc-9426ce98ccb35a43b4f3e8ea14dcbf2f5de5dc48.tar.gz
gcc-9426ce98ccb35a43b4f3e8ea14dcbf2f5de5dc48.tar.bz2
c++: Fix up handling of dependent (late) attributes on function/method types [PR116175]
When working on unsequenced/reproducible attributes, I've noticed that on templates for some attributes decl_attributes isn't called at all, so they are kept in TYPE_ATTRIBUTES without any verification/transformations and also without argument substitution. The following patch fixes that for FUNCTION/METHOD_TYPE attributes. The included testcase ICEs without the pt.cc changes. 2024-08-07 Jakub Jelinek <jakub@redhat.com> PR c++/116175 * pt.cc (apply_late_template_attributes): For function/method types call cp_build_type_attribute_variant on the non-dependent attributes. (rebuild_function_or_method_type): Add ARGS argument. Use apply_late_template_attributes rather than cp_build_type_attribute_variant. (maybe_rebuild_function_decl_type): Add ARGS argument, pass it to rebuild_function_or_method_type. (tsubst_function_decl): Adjust caller. (tsubst_function_type): Adjust rebuild_function_or_method_type caller. * g++.dg/ext/attr-format4.C: New test.
Diffstat (limited to 'gcc/tree-iterator.cc')
0 files changed, 0 insertions, 0 deletions