As the bug report says,
struct A
{
template<typename T> operator T();
};
void foo()
{
A().operator auto();
}
causes: "undeduced type in IR-generation
UNREACHABLE executed at llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp:208!"
The problem is that in this case, "T" is being deduced as "auto", which I believe is incorrect.
The 'operator auto' implementation in Clang is standards compliant, however there is a defect report against core (1670).
Maybe only call this once?