Commit 29b801f4 authored by Bill Wendling's avatar Bill Wendling
Browse files

Merging r155426:

------------------------------------------------------------------------
r155426 | rsmith | 2012-04-23 22:48:42 -0700 (Mon, 23 Apr 2012) | 3 lines

Don't try to delay parsing the exception specification for a data member of a
class; we would never actually parse it and attach it to the type.

------------------------------------------------------------------------

llvm-svn: 156701
parent 1ef34dea
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -60,8 +60,16 @@ namespace test3 {
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()), "");
}