[Lldb-commits] [PATCH] D143398: [lldb][DWARFASTParserClang] Correctly resolve imported namespaces during expression evaluation

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 9 13:33:54 PST 2023


aprantl accepted this revision.
aprantl added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:3480
+  if (auto it = m_die_to_decl_ctx.find(die.GetDIE());
+      it != m_die_to_decl_ctx.end())
+    return static_cast<clang::NamespaceDecl *>(it->getSecond());
----------------
I think this is a bit too clever for my personal taste :-)

I would go with the namespace-polluting
```
auto it = m_die_to_decl_ctx.find(die.GetDIE());
if (it != m_die_to_decl_ctx.end())
```
instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143398/new/

https://reviews.llvm.org/D143398



More information about the lldb-commits mailing list