aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
diff options
context:
space:
mode:
authorJakub Kuderski <jakub@nod-labs.com>2025-10-30 13:27:41 -0400
committerGitHub <noreply@github.com>2025-10-30 13:27:41 -0400
commit0029815af7b8335054345e2f5aacf68ef9d18e81 (patch)
treefbaabcc4058fcc15d99665041f598ef19add1e2e /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
parent3056727a1ad8d8860d5c4302dd6867e485da38c9 (diff)
downloadllvm-0029815af7b8335054345e2f5aacf68ef9d18e81.zip
llvm-0029815af7b8335054345e2f5aacf68ef9d18e81.tar.gz
llvm-0029815af7b8335054345e2f5aacf68ef9d18e81.tar.bz2
[ADT] Support `.Default` with `nullptr` and `nullopt` values in TypeSwitch (#165724)
In the previous implementation, this would fail for cases like `TypeSwitch<T*, std::optional<U>>` because `std::nullopt` does not match `ResultT` exactly and the overload for callable types would be selected. Add new overloads that support `nullptr` and `std::nullopt`. These can be added alongside generic callables because we wouldn't want to call any 'null' function refs anyway. I selected the `nullptr` and `nullopt` specializations because how often they appear in the codebase -- currently, you will see lots of code like `.Default(std::optional<T>())` that can be simplified with this patch.
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp')
0 files changed, 0 insertions, 0 deletions