In the following example, we will end up hitting the llvm_unreachable():
https://godbolt.org/z/5sccc95Ec
enum class E {}; const E glob[] = {{}}; void initlistWithinInitlist() { clang_analyzer_dump(glob[0]); // crashes at loading from `glob[0]` }
We should just return std::nullopt instead for these cases. It's better than crashing.