diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-05-12 06:53:18 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-05-12 06:53:18 +0000 |
commit | 85f02c651a9d9af4beea7d5ec6e17d55acda4f51 (patch) | |
tree | c1a96646842f3d1ad9e68219bce17ed7adb9f011 | |
parent | 8e0f753ecbabba9b5f61c5c9ce8390b8bbebfe54 (diff) |
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.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156701 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CXX/class/class.mem/p2.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CXX/class/class.mem/p2.cpp b/test/CXX/class/class.mem/p2.cpp index 3e957df69d..bf7b3d49c9 100644 --- a/test/CXX/class/class.mem/p2.cpp +++ b/test/CXX/class/class.mem/p2.cpp @@ -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()), ""); } |