From 7ec859446c3fecfefa1c8e8a0785c00b4ca74faf Mon Sep 17 00:00:00 2001 From: Aleksandr Urakov Date: Tue, 6 Nov 2018 08:02:55 +0000 Subject: [PDB] Introduce `MSVCUndecoratedNameParser` This patch introduces the simple MSVCUndecoratedNameParser. It is needed for parsing names of PDB symbols corresponding to template instantiations. For example, for the name `operator<'::`2'::B::operator> we can't just split the name with :: (as it is implemented for now) to retrieve its scopes. This parser processes such names in a more correct way. Differential Revision: https://reviews.llvm.org/D52461 --- lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lldb/unittests') diff --git a/lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp b/lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp index 81d3ac51fd9..ed9b6b08b76 100644 --- a/lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp +++ b/lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp @@ -138,7 +138,14 @@ TEST(CPlusPlusLanguage, ExtractContextAndIdentifier) { {"std::vector>" "::_M_emplace_back_aux", "std::vector>", - "_M_emplace_back_aux"}}; + "_M_emplace_back_aux"}, + {"`anonymous namespace'::foo", "`anonymous namespace'", "foo"}, + {"`operator<'::`2'::B<0>::operator>", + "`operator<'::`2'::B<0>", + "operator>"}, + {"`anonymous namespace'::S::<<::__l2::Foo", + "`anonymous namespace'::S::<<::__l2", + "Foo"}}; llvm::StringRef context, basename; for (const auto &test : test_cases) { -- cgit v1.2.3