aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/explicit-specialization-member.cpp
diff options
context:
space:
mode:
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 f302836c7e4b3..c0c36808b4920 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}}
+}