summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-17 22:30:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-17 22:30:01 +0000
commit87162c2e528921aabb84e96fe7272348a4b3354e (patch)
tree7971c636196449ca3e43c3fd017c43996a43fd4c /test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
parent9591697707c69af99bb196d70895f4e7e28be333 (diff)
PR12569: Instantiate exception specifications of explicit instantiations
and explicit specializations of function templates appropriately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154956 91177308-0d34-0410-b5e6-96231b3b80d8
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}}
+ }
+}