[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 5 05:20:41 PDT 2024


================
@@ -153,19 +127,36 @@ void TypeQuery::SetLanguages(LanguageSet languages) {
 
 bool TypeQuery::ContextMatches(
     llvm::ArrayRef<CompilerContext> context_chain) const {
-  if (GetExactMatch() || context_chain.size() == m_context.size())
-    return ::contextMatches(context_chain, m_context);
+  auto ctx = context_chain.rbegin(), ctx_end = context_chain.rend();
+  for (auto pat = m_context.rbegin(), pat_end = m_context.rend();
----------------
labath wrote:

With the modules out of the way, I guess it could be, but then I'd have to rewrite it again to this form for anonymous namespaces.

https://github.com/llvm/llvm-project/pull/101333


More information about the lldb-commits mailing list