Index: clang/lib/AST/Type.cpp =================================================================== --- clang/lib/AST/Type.cpp +++ clang/lib/AST/Type.cpp @@ -3325,9 +3325,10 @@ switch (getExceptionSpecType()) { case EST_Unparsed: case EST_Unevaluated: - case EST_Uninstantiated: llvm_unreachable("should not call this with unresolved exception specs"); + case EST_Uninstantiated: + return CT_Dependent; case EST_DynamicNone: case EST_BasicNoexcept: case EST_NoexceptTrue: Index: clang/test/SemaTemplate/class-template-deduction.cpp =================================================================== --- /dev/null +++ clang/test/SemaTemplate/class-template-deduction.cpp @@ -0,0 +1,36 @@ +// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -std=c++11 -verify %s +// RUN: %clang_cc1 -std=c++17 -verify %s +// RUN: %clang_cc1 -std=c++1z -verify %s +#if __cplusplus >= 201703 +// expected-no-diagnostics +#endif +template +void foo() noexcept(U::X); +class A { +public: + static const bool X; +}; + +const bool A::X = 0; + +template +#if __cplusplus >= 201703 +bool bar(void(B...) noexcept(x)) +#else +bool bar(void(B...) noexcept(x)) // expected-note{{candidate template ignored}} +#endif +{ + return x; +} + +void func() +{ +#if __cplusplus >= 201703 + bar(foo); +#else + bar(foo); // expected-error{{no matching function for call}} +#endif +} + +