[Lldb-commits] [lldb] [LLDB][NativePDB] Allow type lookup in namespaces (PR #149876)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 28 03:21:18 PDT 2025
================
@@ -134,7 +134,9 @@ bool TypeQuery::ContextMatches(
if (ctx == ctx_end)
return false; // Pattern too long.
- if (ctx->kind == CompilerContextKind::Namespace && ctx->name.IsEmpty()) {
+ if ((ctx->kind & CompilerContextKind::Namespace) ==
----------------
Nerixyz wrote:
> How expensive is this "get the parent to handle nested structs/enums/unions" operation?
This is only a lookup in a map that we created. But this only works for tag types, not for namespaces. My approach now uses `Type::GetTypeScopeAndBasename` to split the undecorated name. At first, it assumes everything is a namespace and then walks backwards to find parent types.
I'm not sure what the best way to test this is.
https://github.com/llvm/llvm-project/pull/149876
More information about the lldb-commits
mailing list