diff options
Diffstat (limited to 'test/FixIt/fixit-cxx0x.cpp')
-rw-r--r-- | test/FixIt/fixit-cxx0x.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp index a173ce4..1f6275f 100644 --- a/test/FixIt/fixit-cxx0x.cpp +++ b/test/FixIt/fixit-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -std=c++11 %s +// RUN: %clang_cc1 -verify -std=c++11 -Wno-anonymous-pack-parens %s // RUN: cp %s %t // RUN: not %clang_cc1 -x c++ -std=c++11 -fixit %t // RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++11 %t @@ -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; + } + }; +} |