summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-exception-spec-cxx11.cpp')
-rw-r--r--test/SemaTemplate/instantiate-exception-spec-cxx11.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp b/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
index 763b9ed41b..d29c8862b9 100644
--- a/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
+++ b/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
@@ -105,3 +105,16 @@ namespace core_19754_example {
base<types> val = base<types>();
}
+
+namespace pr9485 {
+ template <typename T> void f1(T) throw(typename T::exception); // expected-note {{candidate}}
+ template <typename T> void f1(T, int = 0) throw(typename T::noitpecxe); // expected-note {{candidate}}
+
+ template <typename T> void f2(T) noexcept(T::throws); // expected-note {{candidate}}
+ template <typename T> void f2(T, int = 0) noexcept(T::sworht); // expected-note {{candidate}}
+
+ void test() {
+ f1(0); // expected-error {{ambiguous}}
+ f2(0); // expected-error {{ambiguous}}
+ }
+}