diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /test/SemaTemplate/instantiate-static-var.cpp | |
parent | 69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff) | |
download | FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz |
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/SemaTemplate/instantiate-static-var.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-static-var.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaTemplate/instantiate-static-var.cpp b/test/SemaTemplate/instantiate-static-var.cpp index e90ac52..0c06075 100644 --- a/test/SemaTemplate/instantiate-static-var.cpp +++ b/test/SemaTemplate/instantiate-static-var.cpp @@ -2,7 +2,7 @@ template<typename T, T Divisor> class X { public: - static const T value = 10 / Divisor; // expected-error{{in-class initializer is not an integral constant expression}} + static const T value = 10 / Divisor; // expected-error{{in-class initializer is not a constant expression}} }; int array1[X<int, 2>::value == 5? 1 : -1]; @@ -11,7 +11,7 @@ X<int, 0> xi0; // expected-note{{in instantiation of template class 'X<int, 0>' template<typename T> class Y { - static const T value = 0; // expected-error{{'value' can only be initialized if it is a static const integral data member}} + static const T value = 0; // expected-warning{{in-class initializer for static data member of type 'const float' is a C++0x extension}} }; Y<float> fy; // expected-note{{in instantiation of template class 'Y<float>' requested here}} |