diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-09-29 19:11:37 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-09-29 19:11:37 +0000 |
| commit | 2316cd8b798be3163878e7397ec68a8890063098 (patch) | |
| tree | e89a2675b03c27b64defcc69ac004ff8d0ef6329 /clang/test/SemaTemplate | |
| parent | d71061298cc290668b9640a6a15456ea9b3a937c (diff) | |
| download | bcm5719-llvm-2316cd8b798be3163878e7397ec68a8890063098.tar.gz bcm5719-llvm-2316cd8b798be3163878e7397ec68a8890063098.zip | |
constexpr: semantic checking for constexpr variables.
We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier).
llvm-svn: 140801
Diffstat (limited to 'clang/test/SemaTemplate')
| -rw-r--r-- | clang/test/SemaTemplate/instantiate-static-var.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/instantiate-static-var.cpp b/clang/test/SemaTemplate/instantiate-static-var.cpp index 0c060752483..723cbd388f6 100644 --- a/clang/test/SemaTemplate/instantiate-static-var.cpp +++ b/clang/test/SemaTemplate/instantiate-static-var.cpp @@ -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-warning{{in-class initializer for static data member of type 'const float' is a C++0x extension}} + static const T value = 0; // expected-warning{{in-class initializer for static data member of type 'const float' not allowed, accepted as an extension}} }; Y<float> fy; // expected-note{{in instantiation of template class 'Y<float>' requested here}} |

