[Lldb-commits] [lldb] [lldb] Better matching of types in anonymous namespaces (PR #102111)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 7 10:23:41 PDT 2024
https://github.com/clayborg commented:
This patch relies on "(anonymous namespace)" being removed from the compiler contexts to work. What is the user types any of:
```
(lldb) type lookup "(anonymous namespace)::A"
(lldb) script lldb.target.FindFirstType("(anonymous namespace)::A");
(lldb) script lldb.target.FindTypes("(anonymous namespace)::A");
```
Do we correctly set this "(anonymous namespace)" to empty? Or are we expecting these type lookups will always use the looser matching strategy? If not we need to check for both.
We might want to stop passing around `std::vector<CompilerContext>` and pass around a class that contains the language:
```
struct CompilerContexts {
lldb::LanguageType language;
std::vector<CompilerContext>;
};
```
Then we could add a method to check for anonymous namespaces where C++ can check for "(anonymous namespace)".
https://github.com/llvm/llvm-project/pull/102111
More information about the lldb-commits
mailing list