summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/class.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-06-11 17:19:42 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-06-11 17:19:42 +0000
commit938f40b5aa98165826536c67237fc3329d7c1d80 (patch)
tree05bea26a37c2198bd5e11e42de38021651c1ef15 /clang/test/SemaCXX/class.cpp
parent1c2d29e3c30c852c4a541c24e39897e1de267890 (diff)
downloadbcm5719-llvm-938f40b5aa98165826536c67237fc3329d7c1d80.tar.gz
bcm5719-llvm-938f40b5aa98165826536c67237fc3329d7c1d80.zip
Implement support for C++11 in-class initialization of non-static data members.
llvm-svn: 132878
Diffstat (limited to 'clang/test/SemaCXX/class.cpp')
-rw-r--r--clang/test/SemaCXX/class.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp
index 52140cb0743..44fa0ce7ec9 100644
--- a/clang/test/SemaCXX/class.cpp
+++ b/clang/test/SemaCXX/class.cpp
@@ -34,7 +34,7 @@ public:
enum E1 { en1, en2 };
- int i = 0; // expected-error {{fields can only be initialized in constructors}}
+ int i = 0; // expected-warning {{in-class initialization of non-static data member accepted as a C++0x extension}}
static int si = 0; // expected-error {{non-const static data member must be initialized out of line}}
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}}
OpenPOWER on IntegriCloud