forked from OSchip/llvm-project
Fix up r288457 for compilers that don't support noexcept function types:
disable the test entirely for those cases. This is a quick patch, I'll look at a proper feature flag next. llvm-svn: 288539
This commit is contained in:
parent
ffd5732170
commit
cc2d21111d
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <cassert>
|
||||
|
||||
#ifdef __cpp_noexcept_function_type
|
||||
template<bool Noexcept> void f() noexcept(Noexcept) {}
|
||||
template<bool Noexcept> using FnType = void() noexcept(Noexcept);
|
||||
|
||||
|
@ -57,11 +58,12 @@ void check_deep() {
|
|||
|
||||
int main()
|
||||
{
|
||||
#ifdef __cpp_noexcept_function_type
|
||||
check<false, false>();
|
||||
check<false, true>();
|
||||
check<true, false>();
|
||||
check<true, true>();
|
||||
check_deep();
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
int main() {}
|
||||
#endif
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include <cassert>
|
||||
|
||||
#ifdef __cpp_noexcept_function_type
|
||||
struct X {
|
||||
template<bool Noexcept> void f() noexcept(Noexcept) {}
|
||||
};
|
||||
|
@ -60,11 +61,12 @@ void check_deep() {
|
|||
|
||||
int main()
|
||||
{
|
||||
#ifdef __cpp_noexcept_function_type
|
||||
check<false, false>();
|
||||
check<false, true>();
|
||||
check<true, false>();
|
||||
check<true, true>();
|
||||
check_deep();
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
int main() {}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue