rZhBoYao added inline comments.
================ Comment at: lldb/source/Core/Mangled.cpp:79-81 Mangled::operator void *() const { return (m_mangled) ? const_cast<Mangled *>(this) : nullptr; } ---------------- clayborg wrote: > Looks like there is a similar bug here in this function as well. We should > convert the convert to pointer function here to "operator bool" and add a > unit test. > > ``` > explicit operator bool() const { return m_mangled || m_demangled; } > ``` This change breaks this test: `lldb-shell :: SymbolFile/DWARF/x86/find-qualified-variable.cpp` because the comment in the header file says: "This allows code to check a Mangled object to see if it contains a valid //**mangled name**//", which differs from the comment here, and apparently that's what people's intent was. Modifying `lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2143` solves this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116217/new/ https://reviews.llvm.org/D116217 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits