diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-12 21:11:25 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-12 21:11:25 +0000 |
commit | 37d341d1f0d786e0df31a6983a80cf96c30d5faf (patch) | |
tree | fd616401f740582d7377abf4872a7490e7c977ed /test/CXX | |
parent | 829882796ce575409bda1c0a9f026dbf82bc8086 (diff) | |
download | clang-37d341d1f0d786e0df31a6983a80cf96c30d5faf.tar.gz |
PR38141: check whether noexcept-specifications are equivalent in redeclarations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX')
-rw-r--r-- | test/CXX/except/except.spec/p3.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CXX/except/except.spec/p3.cpp b/test/CXX/except/except.spec/p3.cpp index 03f1d7626c..d5af465104 100644 --- a/test/CXX/except/except.spec/p3.cpp +++ b/test/CXX/except/except.spec/p3.cpp @@ -104,3 +104,13 @@ void* operator new(mysize_t); void* operator new[](mysize_t); void* operator new[](mysize_t) throw(std::bad_alloc); +template<bool X> void equivalent() noexcept (X); +template<bool X> void equivalent() noexcept (X); + +template<bool X, bool Y> void not_equivalent() noexcept (X); // expected-note {{previous}} +template<bool X, bool Y> void not_equivalent() noexcept (Y); // expected-error {{does not match}} + +template<bool X> void missing() noexcept (X); // expected-note {{previous}} +// FIXME: The missing exception specification that we report here doesn't make +// sense in the context of this declaration. +template<bool P> void missing(); // expected-error {{missing exception specification 'noexcept(X)'}} |