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(T::value); +struct S { + static const bool value; +}; + +const bool S::value = 0; + +template +#if __cplusplus >= 201703 +constexpr bool is_noexcept_function(void(Args...) noexcept(is_noexcept)) { +#else +constexpr bool is_noexcept_function(void(Args...) noexcept(is_noexcept)) { // expected-note{{candidate template ignored}} +#endif + return is_noexcept; +} + +void fn() +{ +#if __cplusplus >= 201703 + is_noexcept_function(foo); +#else + is_noexcept_function(foo); // expected-error{{no matching function for call}} +#endif + + +} + +