[Lldb-commits] [PATCH] D116217: [lldb] Fix PR52702 by fixing Mangled::operator!

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 23 08:38:38 PST 2021


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

We should add a unit test for this to verify this doesn't regress in lldb/unittests/Core/MangledTest.cpp for both the operator bool and the ! operator



================
Comment at: lldb/source/Core/Mangled.cpp:79-81
 Mangled::operator void *() const {
   return (m_mangled) ? const_cast<Mangled *>(this) : nullptr;
 }
----------------
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; }
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116217



More information about the lldb-commits mailing list