diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-09-29 21:28:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-09-29 21:28:14 +0000 |
commit | ee6311df69725a6fb5d7475a2bb3f58ceca519a9 (patch) | |
tree | 07f50361e59c8329142e874e97e972f5b21c2d1b /clang/test/SemaCXX/class.cpp | |
parent | 624784a987d11a4f6c45bf9c6d69c33c687b5f71 (diff) | |
download | bcm5719-llvm-ee6311df69725a6fb5d7475a2bb3f58ceca519a9.tar.gz bcm5719-llvm-ee6311df69725a6fb5d7475a2bb3f58ceca519a9.zip |
In C++0x, static const volatile data members cannot be initialized in-class.
llvm-svn: 140809
Diffstat (limited to 'clang/test/SemaCXX/class.cpp')
-rw-r--r-- | clang/test/SemaCXX/class.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp index 4071d1fdbb5..725e93f40c6 100644 --- a/clang/test/SemaCXX/class.cpp +++ b/clang/test/SemaCXX/class.cpp @@ -39,6 +39,7 @@ public: static const NestedC ci = 0; // expected-error {{static data member of type 'const C::NestedC' must be initialized out of line}} static const int nci = vs; // expected-error {{in-class initializer is not a constant expression}} static const int vi = 0; + static const volatile int cvi = 0; // ok, illegal in C++0x static const E evi = 0; void m() { |