[lldb][CPlusPlus] Introduce CPlusPlusLanguage::MethodName::GetReturnType
authorMichael Buch <michaelbuch12@gmail.com>
Thu, 27 Oct 2022 10:09:22 +0000 (11:09 +0100)
committerMichael Buch <michaelbuch12@gmail.com>
Mon, 31 Oct 2022 12:25:18 +0000 (12:25 +0000)
commit76f34ed2837880c1865202f28988b01c93ac4f89
treef614a6fe4033d33ea98408507dba92ff64eb18a8
parentd0bf48c7b179027d978c479167e23825b8d0c4f6
[lldb][CPlusPlus] Introduce CPlusPlusLanguage::MethodName::GetReturnType

This patch adds a way to extract the return type out
of the `CPlusPlusNameParser`. This will be useful
for cases where we want a function's basename *and* the
return type but not the function arguments; this is
currently not possible (the parser either gives us the
full name or just the basename). Since the parser knows
how to handle return types already we should just expose
this to users that need it.

**Testing**

* Added unit-tests

Differential Revision: https://reviews.llvm.org/D136935
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h
lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp