[Lldb-commits] [lldb] [LLDB][NativePDB] Allow type lookup in namespaces (PR #149876)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 23 03:57:23 PDT 2025
================
@@ -164,7 +166,9 @@ bool TypeQuery::ContextMatches(
auto should_skip = [this](const CompilerContext &ctx) {
if (ctx.kind == CompilerContextKind::Module)
return GetIgnoreModules();
- if (ctx.kind == CompilerContextKind::Namespace && ctx.name.IsEmpty())
+ if ((ctx.kind & CompilerContextKind::Namespace) ==
+ CompilerContextKind::Namespace &&
----------------
Nerixyz wrote:
No, `CompilerContextKind` is a bitmask. The [`TypeQuery` constructor creates](https://github.com/llvm/llvm-project/blob/9ad7edef4276207ca4cefa6b39d11145f4145a72/lldb/source/Symbol/Type.cpp#L76-L79) contexts of [`AnyDeclContext`](https://github.com/llvm/llvm-project/blob/d449d3dc13daff388cbf6a7bb910e0511804eb84/lldb/include/lldb/lldb-private-enumerations.h#L213-L214). So `kind == Namespace` is false but `kind & Namespace` is true.
https://github.com/llvm/llvm-project/pull/149876
More information about the lldb-commits
mailing list