================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to