[Lldb-commits] [PATCH] D138892: [DataFormatter] Fix variant npos with `_LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION` enabled.
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 29 02:16:08 PST 2022
labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp:74
+ case 1:
+ return static_cast<unsigned char>(-1);
+ case 2:
----------------
I'd probably use fixed with types (uint8_t et al.) here.
================
Comment at: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp:32
std::variant<int, double, char> v_no_value;
+ std::variant<
+ int, int, int, int, int, int, int, int, int, int, int, int, int, int,
----------------
Maybe just add a quick note that the number 300 was chosen because it does not fit into a single byte.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138892/new/
https://reviews.llvm.org/D138892
More information about the lldb-commits
mailing list