case EST_BasicNoexcept:
case EST_NoexceptTrue:
case EST_NoThrow:
- case EST_Unparsed:
// Exception spec doesn't conflict with nothrow, so don't warn.
- // Unparsed is included in this, since method signatures aren't parsed
- // until after the fact.
+ LLVM_FALLTHROUGH;
+ case EST_Unparsed:
+ case EST_Uninstantiated:
+ case EST_DependentNoexcept:
+ case EST_Unevaluated:
+ // We don't have enough information to properly determine if there is a
+ // conflict, so suppress the warning.
break;
-
case EST_Dynamic:
case EST_MSAny:
case EST_NoexceptFalse:
- case EST_DependentNoexcept:
- case EST_Unevaluated:
- case EST_Uninstantiated:
S.Diag(attr.getLoc(), diag::warn_nothrow_attribute_ignored);
break;
}
// expected-warning@+1{{'nothrow' attribute conflicts with exception specification; attribute ignored}}
__declspec(nothrow) void foo6() noexcept(noexcept(foo3()));
+template<typename F>
+__declspec(nothrow) void foo7() noexcept(noexcept(F()));
+
// FIXME: It would be nice to be able to warn on these, however at the time we
// evaluate the nothrow, these have yet to be parsed, so the data is not yet
// there.