summaryrefslogtreecommitdiff
path: root/test/PCH
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-09-24 04:49:23 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-09-24 04:49:23 +0000
commitecbce69e354c77bf2d359111bad0c77c516e16f0 (patch)
tree074c7cd3b390ac05673a3d0020e5cf13de90b084 /test/PCH
parentf7b9a5a37fc9d1f6356afa14865129fb4a617932 (diff)
downloadclang-ecbce69e354c77bf2d359111bad0c77c516e16f0.tar.gz
clang-ecbce69e354c77bf2d359111bad0c77c516e16f0.tar.bz2
clang-ecbce69e354c77bf2d359111bad0c77c516e16f0.tar.xz
Implement restriction that a partial specialization must actually specialize
something, for variable templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r--test/PCH/cxx1y-variable-templates.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/PCH/cxx1y-variable-templates.cpp b/test/PCH/cxx1y-variable-templates.cpp
index 0c600b29d3..77eeea22a2 100644
--- a/test/PCH/cxx1y-variable-templates.cpp
+++ b/test/PCH/cxx1y-variable-templates.cpp
@@ -58,7 +58,7 @@ namespace spec {
template<typename T> T vc = T();
template<typename T> constexpr T vd = T(10);
- template<typename T> T* vd<T> = new T();
+ template<typename T> T* vd<T*> = new T();
}
namespace spec_join1 {
@@ -72,7 +72,7 @@ namespace spec_join1 {
template<typename T> T vc = T(10);
template<typename T> T vd = T(10);
- template<typename T> extern T* vd<T>;
+ template<typename T> extern T* vd<T*>;
}
#endif
@@ -108,7 +108,7 @@ namespace spec_join1 {
template int vc<int>;
template<typename T> extern T vd;
- template<typename T> T* vd<T> = new T();
+ template<typename T> T* vd<T*> = new T();
}
#endif
@@ -146,16 +146,16 @@ namespace spec {
static_assert(va<float> == 1.5, "");
static_assert(va<int> == 10, "");
- template<typename T> T* vb<T> = new T();
- int* intpb = vb<int>;
+ template<typename T> T* vb<T*> = new T();
+ int* intpb = vb<int*>;
static_assert(vb<float> == 1.5, "");
- template<typename T> T* vc<T> = new T();
+ template<typename T> T* vc<T*> = new T();
template<> constexpr float vc<float> = 1.5;
- int* intpc = vc<int>;
+ int* intpc = vc<int*>;
static_assert(vc<float> == 1.5, "");
- char* intpd = vd<char>;
+ char* intpd = vd<char*>;
}
namespace spec_join1 {
@@ -165,7 +165,7 @@ namespace spec_join1 {
template<typename T> extern T vb;
int b = vb<int>;
- int* intpb = vd<int>;
+ int* intpb = vd<int*>;
}
#endif