[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches (PR #99305)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 29 08:16:51 PDT 2024
labath wrote:
My idea for anonymous namespaces was basically to treat them as optional, so that you could get a match (even an "exact" match maybe?) for `(anonymous namespace)::Foo` with a pattern `Foo`. However, if a pattern explicitly contained an `(anonymous namespace)`, then this would have to be present in the type as well (*).
The reason I'm looking into this is because we got a bug report that dynamic type resolution isn't working. This works by demangling the type vtable, and then looking up the type with the demangled name. This doesn't didn't work for types in anonymous namespaces.
Now that you mention functions, I see that this also wouldn't work for types defined in functions. However, that isn't a bridge I want to cross right now.
(*) One of the annoying things about anonymous namespaces is that they can appear anywhere, and even multiple times, so you can end up with types like `A::(anonymous namespace)::B::(anonymous namespace)::T`. This should work with my patch.
https://github.com/llvm/llvm-project/pull/99305
More information about the lldb-commits
mailing list