aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/class.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-09-29 21:28:14 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-09-29 21:28:14 +0000
commit2da7a51270a5f40e88d07750ebdadd774368b9f4 (patch)
tree5fd02caf22b3ca1a7f30d1216e5834b75d96595e /test/SemaCXX/class.cpp
parent1991b7139a92d73420336690a870f049e88cfad6 (diff)
In C++0x, static const volatile data members cannot be initialized in-class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/class.cpp')
-rw-r--r--test/SemaCXX/class.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp
index 4071d1fdbb..725e93f40c 100644
--- a/test/SemaCXX/class.cpp
+++ b/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() {