[lldb][Test] Add CPlusPlusNameParser unit-test: C-array function arguments

Tests that `CPlusPlusLanguage::MethodName` can parse demangled
names that contain references to C-arrays.

Example taken from libcxx API in the wild.
This commit is contained in:
Michael Buch 2022-10-24 07:42:01 +01:00
parent edb68a4533
commit 38389f3109
1 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,13 @@ TEST(CPlusPlusLanguage, MethodNameParsing) {
{"llvm::Optional<llvm::MCFixupKind>::operator*() const &",
"llvm::Optional<llvm::MCFixupKind>", "operator*", "()", "const &",
"llvm::Optional<llvm::MCFixupKind>::operator*"},
{"auto std::__1::ranges::__begin::__fn::operator()[abi:v160000]<char "
"const, 18ul>(char const (&) [18ul]) const",
"std::__1::ranges::__begin::__fn",
"operator()[abi:v160000]<char const, 18ul>", "(char const (&) [18ul])",
"const",
"std::__1::ranges::__begin::__fn::operator()[abi:v160000]<char const, "
"18ul>"},
// Internal classes
{"operator<<(Cls, Cls)::Subclass::function()",
"operator<<(Cls, Cls)::Subclass", "function", "()", "",