================ @@ -491,6 +491,18 @@ static void GetTypeLookupContextImpl(DWARFDIE die, case DW_TAG_base_type: push_ctx(CompilerContextKind::Builtin, name); break; + // If any of the tags below appear in the parent chain, stop the decl + // context and return. Prior to these being in here, if a type existed in a + // namespace "a" like "a::my_struct", but we also have a function in that + // same namespace "a" which contained a type named "my_struct", both would + // return "a::my_struct" as the declaration context since the + // DW_TAG_subprogram would be skipped and its parent would be found. + case DW_TAG_compile_unit: ---------------- Michael137 wrote:
Ah looks like the early-return was removed in the refactor in https://github.com/llvm/llvm-project/pull/93291? This LGTM but @labath had plans to align `GetTypeLookupContext` and `GetDeclContext`, so wanted him to have a look too https://github.com/llvm/llvm-project/pull/94846 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits