================ @@ -444,6 +499,72 @@ void DebugNamesDWARFIndex::GetNamespaces( m_fallback.GetNamespaces(name, callback); } +llvm::SmallVector<CompilerContext> +DebugNamesDWARFIndex::GetTypeQueryParentContexts(TypeQuery &query) { + std::vector<lldb_private::CompilerContext> &query_decl_context = + query.GetContextRef(); + llvm::SmallVector<CompilerContext> parent_contexts; + if (!query_decl_context.empty()) { + // Skip the last entry, it is the type we are looking for. ---------------- Jlalond wrote:
This comment is confusing the last element contains what we have, but then we reverse the `0..N-1` part of the list and capture this data is the check if it's invalid and that we have a non-invalid/null name. I can figure out what you're doing but I think we can rework some of the comments. ``` // Skip the last entry as it's the type we're finding parents for. ``` Also, why are we reversing it? That is not very apparent to me https://github.com/llvm/llvm-project/pull/108907 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits