[Lldb-commits] [PATCH] D133259: [lldb] Don't assume name of libc++ inline namespace in LibCxxUnorderedMap

Jordan Rupprecht via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 6 14:45:15 PDT 2022


rupprecht added inline comments.


================
Comment at: lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp:76
+    auto ident_end =
+        name.find_if_not([](char c) { return std::isalnum(c) || c == '_'; });
+    if (ident_end != llvm::StringRef::npos && ident_end >= 1) {
----------------
This might be overly generic: every libc++ std inline namespace I've seen is `__[a-zA-Z0-9]+::`, e.g. we should handle `std::__foo::unordered_map` but not `std::foo::unordered_map`. I don't know if we've codified that convention anywhere.

For comparison, see https://github.com/llvm/llvm-project/blob/839b436c93604e042f74050cf2adadd75f30e898/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp#L580


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133259



More information about the lldb-commits mailing list