diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h index 5baafd2ae0d0..6acefeea8484 100644 --- a/libcxxabi/src/demangle/ItaniumDemangle.h +++ b/libcxxabi/src/demangle/ItaniumDemangle.h @@ -3421,7 +3421,7 @@ const typename AbstractManglingParser< {"or", OperatorInfo::Binary, false, Node::Prec::Ior, "operator|"}, {"pL", OperatorInfo::Binary, false, Node::Prec::Assign, "operator+="}, {"pl", OperatorInfo::Binary, false, Node::Prec::Additive, "operator+"}, - {"pm", OperatorInfo::Member, /*Named*/ false, Node::Prec::PtrMem, + {"pm", OperatorInfo::Member, /*Named*/ true, Node::Prec::PtrMem, "operator->*"}, {"pp", OperatorInfo::Postfix, false, Node::Prec::Postfix, "operator++"}, {"ps", OperatorInfo::Prefix, false, Node::Prec::Unary, "operator+"}, diff --git a/libcxxabi/test/test_demangle.pass.cpp b/libcxxabi/test/test_demangle.pass.cpp index 343885da3017..8e85f53f08a8 100644 --- a/libcxxabi/test/test_demangle.pass.cpp +++ b/libcxxabi/test/test_demangle.pass.cpp @@ -30248,6 +30248,8 @@ const char* cases[][2] = { {"_Z3fooPU9__ptrauthILj3ELb1ELj234EEPi", "foo(int* __ptrauth<3u, true, 234u>*)"}, {"_Z3fooIPU9__ptrauthILj1ELb0ELj64EEPiEvT_", "void foo*>(int* __ptrauth<1u, false, 64u>*)"}, + + {"_ZN1CpmEi", "C::operator->*(int)"}, // clang-format on }; @@ -30293,7 +30295,7 @@ const unsigned NF = sizeof(fp_literal_cases) / sizeof(fp_literal_cases[0]); const unsigned NEF = sizeof(fp_literal_cases[0].expecting) / sizeof(fp_literal_cases[0].expecting[0]); -const char *invalid_cases[] = { +const char* invalid_cases[] = { // clang-format off "_ZIPPreEncode", "Agentt", @@ -30351,6 +30353,8 @@ const char *invalid_cases[] = { "_ZGI3Foo", "_ZGIW3Foov", "W1x", + "_ZN1CdtEi", + "_ZN1CdsEi", // clang-format on }; diff --git a/llvm/include/llvm/Demangle/ItaniumDemangle.h b/llvm/include/llvm/Demangle/ItaniumDemangle.h index 67d6152c747d..295c12ab2491 100644 --- a/llvm/include/llvm/Demangle/ItaniumDemangle.h +++ b/llvm/include/llvm/Demangle/ItaniumDemangle.h @@ -3421,7 +3421,7 @@ const typename AbstractManglingParser< {"or", OperatorInfo::Binary, false, Node::Prec::Ior, "operator|"}, {"pL", OperatorInfo::Binary, false, Node::Prec::Assign, "operator+="}, {"pl", OperatorInfo::Binary, false, Node::Prec::Additive, "operator+"}, - {"pm", OperatorInfo::Member, /*Named*/ false, Node::Prec::PtrMem, + {"pm", OperatorInfo::Member, /*Named*/ true, Node::Prec::PtrMem, "operator->*"}, {"pp", OperatorInfo::Postfix, false, Node::Prec::Postfix, "operator++"}, {"ps", OperatorInfo::Prefix, false, Node::Prec::Unary, "operator+"},