diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-06-10 20:45:12 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-06-10 20:45:12 +0000 |
commit | 6a0372513edbc473b538d2f724efac50405d6fef (patch) | |
tree | 8f7776b7310bebaf415ac5b69e46e9f928c37144 /test/CXX/except/except.spec/p14.cpp | |
parent | 809500fc2c13c8173a16b052304d983864e4a1e1 (diff) |
Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3vendor/clang/clang-release_33-r183502
Notes
Notes:
svn path=/vendor/clang/dist/; revision=251609
svn path=/vendor/clang/clang-release_33-r183502/; revision=251610; tag=vendor/clang/clang-release_33-r183502
Diffstat (limited to 'test/CXX/except/except.spec/p14.cpp')
-rw-r--r-- | test/CXX/except/except.spec/p14.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CXX/except/except.spec/p14.cpp b/test/CXX/except/except.spec/p14.cpp index 99ed2fdee19d..dda69e9aad60 100644 --- a/test/CXX/except/except.spec/p14.cpp +++ b/test/CXX/except/except.spec/p14.cpp @@ -112,3 +112,26 @@ namespace rdar13017229 { Typo foo(); // expected-error{{unknown type name 'Typo'}} }; } + +namespace InhCtor { + template<int> struct X {}; + struct Base { + Base(X<0>) noexcept(true); + Base(X<1>) noexcept(false); + Base(X<2>) throw(X<2>); + template<typename T> Base(T) throw(T); + }; + template<typename T> struct Throw { + Throw() throw(T); + }; + struct Derived : Base, Throw<X<3>> { + using Base::Base; + Throw<X<4>> x; + }; + struct Test { + friend Derived::Derived(X<0>) throw(X<3>, X<4>); + friend Derived::Derived(X<1>) noexcept(false); + friend Derived::Derived(X<2>) throw(X<2>, X<3>, X<4>); + }; + static_assert(!noexcept(Derived{X<5>{}}), ""); +} |