[lldb][Test] Add C-array test-cases to CPlusPlusNameParser unit-tests
authorMichael Buch <michaelbuch12@gmail.com>
Sat, 22 Oct 2022 11:14:28 +0000 (12:14 +0100)
committerMichael Buch <michaelbuch12@gmail.com>
Sat, 22 Oct 2022 11:16:07 +0000 (12:16 +0100)
Make sure we test the code path where we parse
function templates instantiated with C-arrays.

lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp

index e843782..b5608fb 100644 (file)
@@ -116,6 +116,12 @@ TEST(CPlusPlusLanguage, MethodNameParsing) {
        "const volatile &&", "llvm::Optional<llvm::MCFixupKind>::operator*"},
       {"void foo<Dummy<char [10]>>()", "", "foo<Dummy<char [10]>>", "()", "",
        "foo<Dummy<char [10]>>"},
+      {"void foo<Bar<Bar<int>[10]>>()", "", "foo<Bar<Bar<int>[10]>>", "()", "",
+       "foo<Bar<Bar<int>[10]>>"},
+      {"void foo<Bar[10]>()", "", "foo<Bar[10]>", "()", "",
+       "foo<Bar[10]>"},
+      {"void foo<Bar[]>()", "", "foo<Bar[]>", "()", "",
+       "foo<Bar[]>"},
 
       // auto return type
       {"auto std::test_return_auto<int>() const", "std",