Michael Buch 9ebe6f9a1f
[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
2025-07-07 14:28:19 +01:00
..