[Lldb-commits] [PATCH] D136650: Make CompilerType safe [Was: Add a check for TypeSystem use-after-free problems]
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 11 13:35:25 PST 2022
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.
LGTM modulo a few small nits
================
Comment at: lldb/include/lldb/Symbol/CompilerType.h:60
+ }
+ operator bool() const { return (bool)m_typesystem_sp; }
+ bool operator==(const TypeSystemSPWrapper &other) const;
----------------
Nit: `static_cast<bool>(m_typesystem_sp)`
================
Comment at: lldb/source/API/SBModule.cpp:457
+ sb_type = SBType(ts->GetBuiltinTypeByName(name));
+ else
+ return {};
----------------
no else after return
================
Comment at: lldb/source/API/SBModule.cpp:502-504
+ CompilerType compiler_type =
+ ts->GetBuiltinTypeByName(name);
+ if (compiler_type)
----------------
`if (CompilerType compiler_type = ts->GetBuiltinTypeByName(name))`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136650/new/
https://reviews.llvm.org/D136650
More information about the lldb-commits
mailing list