From 82dce550c805f079ecf025e94f16df947b7433fb Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 14 Apr 2014 21:00:40 +0000 Subject: PR19415: Converting 'constexpr' to 'const' in a non-static data member can fail if the member is already 'const'. Don't assert in that case. llvm-svn: 206205 --- clang/test/FixIt/fixit-cxx0x.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/test/FixIt/fixit-cxx0x.cpp') diff --git a/clang/test/FixIt/fixit-cxx0x.cpp b/clang/test/FixIt/fixit-cxx0x.cpp index bfd8c3dcfea..5fe7ca4ea9c 100644 --- a/clang/test/FixIt/fixit-cxx0x.cpp +++ b/clang/test/FixIt/fixit-cxx0x.cpp @@ -125,7 +125,8 @@ 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) { + constexpr const int k; // expected-error {{non-static data member cannot be constexpr; did you intend to make it const?}} + foo() : i(3), k(4) { } static int get_j() { return j; -- cgit v1.2.3