aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/explicit-specialization-member.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-16 19:47:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-16 19:47:09 +0000
commit2410013d9382b8129702fa3a3bf19a370ae7afc3 (patch)
treedf038b6418b19d03437950dcee799c1483c6246a /test/SemaTemplate/explicit-specialization-member.cpp
parent0a5fb09b599c1bdea3cd11168bb8f4ff4040316e (diff)
Notes
Diffstat (limited to 'test/SemaTemplate/explicit-specialization-member.cpp')
-rw-r--r--test/SemaTemplate/explicit-specialization-member.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/SemaTemplate/explicit-specialization-member.cpp b/test/SemaTemplate/explicit-specialization-member.cpp
index f302836c7e4b..c0c36808b492 100644
--- a/test/SemaTemplate/explicit-specialization-member.cpp
+++ b/test/SemaTemplate/explicit-specialization-member.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -fcxx-exceptions
template<typename T>
struct X0 {
typedef T* type;
@@ -57,3 +57,12 @@ template<typename T> struct Helper {
template<typename T> void Helper<T>::func<2>() {} // expected-error {{cannot specialize a member}} \
// expected-error {{no function template matches}}
}
+
+namespace SpecLoc {
+ template <typename T> struct A {
+ static int n; // expected-note {{previous}}
+ static void f(); // expected-note {{previous}}
+ };
+ template<> float A<int>::n; // expected-error {{different type}}
+ template<> void A<int>::f() throw(); // expected-error {{does not match}}
+}