Skip to content

Commit 46f18b7

Browse files
committed
[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; } ```
1 parent e58d227 commit 46f18b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libcxxabi/test/test_demangle.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29659,6 +29659,8 @@ const char* cases[][2] = {
2965929659
{"_ZNKO1X1hEv", "X::h() const &&"},
2966029660
// {"_Z1fM1XVKFivEMS_VFivEMS_KOFivE", "f(int (X::*)() const volatile, int (X::*)() volatile, int (X::*)() const &&)"},
2966129661
// {"_Z1fM1XRFivEMS_OFivEMS_KOFivE", "f(int (X::*)() &, int (X::*)() &&, int (X::*)() const &&)"},
29662+
{"_Z1fM1XKFivOE", "f(int (X::*)() const &&)"},
29663+
{"_Z1fM1XKFivOEMS_FOKivEMS_VFS3_RS2_E", "f(int (X::*)() const &&, int const&& (X::*)(), int const&& (X::*)(int const&) volatile)"},
2966229664
{"_ZN5test12f0ENS_1TILZNS_1xEEEE", "test1::f0(test1::T<test1::x>)"},
2966329665
{"_ZN5test12f1ENS_2t1ILZNS_2f0EfEEE", "test1::f1(test1::t1<test1::f0(float)>)"},
2966429666
{"_ZN5test22f1ENS_2t1IXadL_ZNS_2f0EfEEEE", "test2::f1(test2::t1<&test2::f0(float)>)"},

0 commit comments

Comments
 (0)