summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-08-31 23:23:25 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-08-31 23:23:25 +0000
commite4caa48dbb744fb809db1f6f09de2ed9576efcea (patch)
tree505582594879dcd41b23047a8bfffcff116dbd15 /clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
parent77807637ffb0fffd6f215187258b0e12c6b6a620 (diff)
downloadbcm5719-llvm-e4caa48dbb744fb809db1f6f09de2ed9576efcea.tar.gz
bcm5719-llvm-e4caa48dbb744fb809db1f6f09de2ed9576efcea.zip
DR259: Demote the pedantic error for an explicit instantiation after an
explicit specialization to a warning for C++98 mode (this is a defect report resolution, so per our informal policy it should apply in C++98), and turn the warning on by default for C++11 and later. In all cases where it fires, the right thing to do is to remove the pointless explicit instantiation. llvm-svn: 280308
Diffstat (limited to 'clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp')
-rw-r--r--clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp b/clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
index e2fbdfd6995..76f1bb9905b 100644
--- a/clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
+++ b/clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
@@ -26,10 +26,10 @@ namespace out_of_line {
template<typename T, typename T0> static CONST T right = T(100);
template<typename T> static CONST T right<T,int> = T(5);
};
- template<> CONST int B0::right<int,int> = 7;
- template CONST int B0::right<int,int>;
- template<> CONST int B0::right<int,float>;
- template CONST int B0::right<int,float>;
+ template<> CONST int B0::right<int,int> = 7; // expected-note {{previous}}
+ template CONST int B0::right<int,int>; // expected-warning {{has no effect}}
+ template<> CONST int B0::right<int,float>; // expected-note {{previous}}
+ template CONST int B0::right<int,float>; // expected-warning {{has no effect}}
class B1 {
template<typename T, typename T0> static CONST T right;
OpenPOWER on IntegriCloud