[Lldb-commits] [lldb] [lldb] Fix CxxMethodName Parser on return type (PR #169652)
David Peixotto via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 26 10:37:41 PST 2025
================
@@ -481,18 +481,22 @@ bool CPlusPlusLanguage::CxxMethodName::TrySimplifiedParse() {
m_basename = full.substr(basename_begin, basename_end - basename_begin);
}
- if (IsTrivialBasename(m_basename)) {
+ // if the context has a white space it may have a return type.
+ // e.g. `int foo::bar::func()` or `Type<int > foo::bar::func(int)`
+ const bool no_whitespace =
----------------
dmpots wrote:
Is the whitespace check sufficient here? It looks like we could still fail by incorrectly parsing something with a return type that does not have a space before the start of the context like this:
```
std::vector<int>foo::bar()
```
Maybe we need a check for `IsValidContext` that makes sure it only consists of identifiers and `:` characters?
https://github.com/llvm/llvm-project/pull/169652
More information about the lldb-commits
mailing list