D.getDeclSpec().getStorageClassSpec()
!= DeclSpec::SCS_typedef &&
!D.getDeclSpec().isFriendSpecified());
+ for (unsigned i = 0, e = D.getNumTypeObjects(); Delayed && i != e; ++i)
+ Delayed &= D.getTypeObject(i).Kind == DeclaratorChunk::Paren;
ESpecType = tryParseExceptionSpecification(Delayed,
ESpecRange,
DynamicExceptions,
namespace PR12629 {
struct S {
static int (f)() throw();
- static int ((((((g))))() throw(int)));
+ static int ((((((g))))() throw(U)));
+ int (*h)() noexcept(false);
+ static int (&i)() noexcept(true);
+ static int (*j)() throw(U); // expected-error {{type name}} \
+ // expected-error {{expected ')'}} expected-note {{to match}}
+
+ struct U {};
};
static_assert(noexcept(S::f()), "");
static_assert(!noexcept(S::g()), "");
+ static_assert(!noexcept(S().h()), "");
+ static_assert(noexcept(S::i()), "");
}