aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-01-13 10:23:53 +0100
committerJakub Jelinek <jakub@redhat.com>2024-01-13 10:23:53 +0100
commit65388b28656d65595bdaf191df85af81c35ca638 (patch)
tree60a1fbdd28b8418a75b4e508a4a3a429ba7149d1 /include
parent34a827039fabcf24ce78da25984a1cc8be7ca2c3 (diff)
downloadgcc-65388b28656d65595bdaf191df85af81c35ca638.zip
gcc-65388b28656d65595bdaf191df85af81c35ca638.tar.gz
gcc-65388b28656d65595bdaf191df85af81c35ca638.tar.bz2
c++, demangle: Implement https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal
The following patch attempts to implement what apparently clang++ implemented for explicit object member function mangling, but nobody actually proposed in patch form in https://github.com/itanium-cxx-abi/cxx-abi/issues/148 2024-01-13 Jakub Jelinek <jakub@redhat.com> gcc/cp/ * mangle.cc (write_nested_name): Mangle explicit object member functions with H as per https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal. gcc/testsuite/ * g++.dg/abi/mangle79.C: New test. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION. libiberty/ * cp-demangle.c (FNQUAL_COMPONENT_CASE): Add case for DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION. (d_dump): Handle DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION. (d_nested_name): Parse H after N in nested name. (d_count_templates_scopes): Handle DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION. (d_print_mod): Likewise. (d_print_function_type): Likewise. * testsuite/demangle-expected: Add tests for explicit object member functions.
Diffstat (limited to 'include')
-rw-r--r--include/demangle.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/demangle.h b/include/demangle.h
index 6a03f4f..49b84d4 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -314,6 +314,8 @@ enum demangle_component_type
/* C++11: An rvalue reference modifying a member function. The one
subtree is the type which is being referenced. */
DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS,
+ /* C++23: A member function with explict object parameter. */
+ DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION,
/* A vendor qualifier. The left subtree is the type which is being
qualified, and the right subtree is the name of the
qualifier. */