When compile following code without -std=c++17, clang will abort by llvm_unreachable:
class A {
public:
static const char X;
};
const char A::X = 0;
template<typename U> void func() noexcept(U::X);
template<class... B, char x>
void foo(void(B...) noexcept(x)) {}
void bar()
{
foo(func<A>);
}
So, my solution is to let EST_Uninstantiated in FunctionProtoType::canThrow return CT_Dependent
Thanks
Zhouyi Zhou <zhouzhouyi@gmail.com>
Slight preference for moving just this line to 3351 (above or below) to get the fallthrough behavior on the existing CT_Dependent without condition.