diff options
Diffstat (limited to 'test/SemaCXX/cxx98-compat.cpp')
-rw-r--r-- | test/SemaCXX/cxx98-compat.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/SemaCXX/cxx98-compat.cpp b/test/SemaCXX/cxx98-compat.cpp index f162c6f32d..b7abe266f2 100644 --- a/test/SemaCXX/cxx98-compat.cpp +++ b/test/SemaCXX/cxx98-compat.cpp @@ -34,8 +34,7 @@ namespace TemplateParsing { } void Lambda() { - // FIXME: Enable when lambdas are minimally working. - //[]{}; // FIXME-warning {{lambda expressions are incompatible with C++98}} + []{}(); // expected-warning {{lambda expressions are incompatible with C++98}} } int InitList() { @@ -239,6 +238,11 @@ namespace UnionOrAnonStructMembers { NonTrivDtor ntd; // expected-warning {{anonymous struct member 'ntd' with a non-trivial destructor is incompatible with C++98}} }; }; + union WithStaticDataMember { + static constexpr double d = 0.0; // expected-warning {{static data member 'd' in union is incompatible with C++98}} expected-warning {{'constexpr' specifier is incompatible with C++98}} + static const int n = 0; // expected-warning {{static data member 'n' in union is incompatible with C++98}} + static int k; // expected-warning {{static data member 'k' in union is incompatible with C++98}} + }; } int EnumNNS = Enum::enum_val; // expected-warning {{enumeration type in nested name specifier is incompatible with C++98}} |