diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-04-14 21:00:40 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-04-14 21:00:40 +0000 |
commit | 82dce550c805f079ecf025e94f16df947b7433fb (patch) | |
tree | 6f9f9fe6a01f6700edaf78c031492b1973a0c8f3 /clang/test/FixIt/fixit-cxx0x.cpp | |
parent | ac9c9a006ff960163b42511142be95bc2486a9b3 (diff) | |
download | bcm5719-llvm-82dce550c805f079ecf025e94f16df947b7433fb.tar.gz bcm5719-llvm-82dce550c805f079ecf025e94f16df947b7433fb.zip |
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
Diffstat (limited to 'clang/test/FixIt/fixit-cxx0x.cpp')
-rw-r--r-- | clang/test/FixIt/fixit-cxx0x.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; |