[all-commits] [llvm/llvm-project] 9ebe6f: [lldb][test] Fix libstdc++ std::variant formatter ...
Michael Buch via All-commits
all-commits at lists.llvm.org
Mon Jul 7 06:28:40 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9ebe6f9a1f9e3473166cd57282c9827df12416a3
https://github.com/llvm/llvm-project/commit/9ebe6f9a1f9e3473166cd57282c9827df12416a3
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2025-07-07 (Mon, 07 Jul 2025)
Changed paths:
M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py
M lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/main.cpp
Log Message:
-----------
[lldb][test] Fix libstdc++ std::variant formatter tests for valueless variants (#147283)
A default-constructed variant has a valid index (being the first element
of the variant). The only case where the index is variant_npos is when
the variant is "valueless", which [according to
cppreference](https://en.cppreference.com/w/cpp/utility/variant/valueless_by_exception.html)
only happens when an exception is thrown during assignment to the
variant.
I adjusted the test to test that scenario, and the formatter seems to
work.
Unblocks https://github.com/llvm/llvm-project/pull/147253
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list