Skip to content
Commit 30adb9fd authored by Zhouyi Zhou's avatar Zhouyi Zhou Committed by Erich Keane
Browse files

let EST_Uninstantiated in FunctionProtoType::canThrow return

CT_Dependent

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

Differential Revision: https://reviews.llvm.org/D121498
parent 4c9bfec6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment