[Lldb-commits] [lldb] [lldb] Support MS style `struct`/`class` in C++ name parser (PR #196525)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 30 01:05:41 PDT 2026
================
@@ -34,6 +34,13 @@ TEST(CPlusPlusLanguage, MethodNameParsing) {
"foo::bar"},
{"int foo::bar::func01(int a, double b)", "int", "foo::bar", "func01",
"(int a, double b)", "", "foo::bar::func01"},
+ {"foo(struct AStruct)", "", "", "foo", "(struct AStruct)", "", "foo"},
----------------
Michael137 wrote:
Are there some negative cases we can test? E.g., `struct` appearing in an odd/unexpected position.
Also what if we have the identifiers as substrings in the name: `structFoo class_(enum_arg)`
And maybe something like `struct foo(class a)`. We're in this awkward spot where we treat C as C++ sometimes, so there's a chance a C program has a type called `class`, and gets here. Not 100%, but i havent looked at the callsites of this in a while
https://github.com/llvm/llvm-project/pull/196525
More information about the lldb-commits
mailing list