diff options
| author | Michael Buch <michaelbuch12@gmail.com> | 2025-04-23 15:40:04 +0100 |
|---|---|---|
| committer | Michael Buch <michaelbuch12@gmail.com> | 2025-04-23 15:42:56 +0100 |
| commit | 46f18b7c6febe75b2cc0095f2227d935c14f70f2 (patch) | |
| tree | 9316180244a63a683aeb0ffded68bac0971853bb /libcxxabi | |
| parent | e58d227b09d533e2df644f827cedff8e206e0bfc (diff) | |
[ItaniumDemangle][test] Add test-cases for ref-qualified member pointer parameters
I noticed that there are test-cases that are commented out. But the
manglings for them seem to be impossible to generate from valid C++. I
added two test-cases generated from following C++ program:
```
struct X {
int func() const && { return 5; }
const int &&func2() { return 5; }
const int &&func3(const int &x) volatile { return 5; }
};
void f(int (X::*)() const &&, int const && (X::*)(),
int const && (X::*)(const int &) volatile) {}
int main() {
f(&X::func, &X::func2, &X::func3);
return 0;
}
```
Diffstat (limited to 'libcxxabi')
| -rw-r--r-- | libcxxabi/test/test_demangle.pass.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxxabi/test/test_demangle.pass.cpp b/libcxxabi/test/test_demangle.pass.cpp index 53da1bf6765e..343885da3017 100644 --- a/libcxxabi/test/test_demangle.pass.cpp +++ b/libcxxabi/test/test_demangle.pass.cpp @@ -29659,6 +29659,8 @@ const char* cases[][2] = { {"_ZNKO1X1hEv", "X::h() const &&"}, // {"_Z1fM1XVKFivEMS_VFivEMS_KOFivE", "f(int (X::*)() const volatile, int (X::*)() volatile, int (X::*)() const &&)"}, // {"_Z1fM1XRFivEMS_OFivEMS_KOFivE", "f(int (X::*)() &, int (X::*)() &&, int (X::*)() const &&)"}, + {"_Z1fM1XKFivOE", "f(int (X::*)() const &&)"}, + {"_Z1fM1XKFivOEMS_FOKivEMS_VFS3_RS2_E", "f(int (X::*)() const &&, int const&& (X::*)(), int const&& (X::*)(int const&) volatile)"}, {"_ZN5test12f0ENS_1TILZNS_1xEEEE", "test1::f0(test1::T<test1::x>)"}, {"_ZN5test12f1ENS_2t1ILZNS_2f0EfEEE", "test1::f1(test1::t1<test1::f0(float)>)"}, {"_ZN5test22f1ENS_2t1IXadL_ZNS_2f0EfEEEE", "test2::f1(test2::t1<&test2::f0(float)>)"}, |
