diff options
Diffstat (limited to 'test/FixIt/fixit-cxx0x.cpp')
-rw-r--r-- | test/FixIt/fixit-cxx0x.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp index a173ce4bc2..3884c64516 100644 --- a/test/FixIt/fixit-cxx0x.cpp +++ b/test/FixIt/fixit-cxx0x.cpp @@ -120,3 +120,15 @@ namespace MissingSemi { struct d // expected-error {{expected ';' after struct}} } } + +namespace NonStaticConstexpr { + struct foo { + constexpr int i; // expected-error {{non-static data member cannot be constexpr; did you intend to make it const?}} + constexpr int j = 7; // expected-error {{non-static data member cannot be constexpr; did you intend to make it static?}} + foo() : i(3) { + } + static int get_j() { + return j; + } + }; +} |