diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | |
parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) |
Notes
Diffstat (limited to 'test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r-- | test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index 860a4aa6c6ff1..f371891e54802 100644 --- a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -153,13 +153,14 @@ void dangle() { } struct haslist1 { - std::initializer_list<int> il = {1, 2, 3}; // expected-warning{{at the end of the constructor}} - std::initializer_list<int> jl{1, 2, 3}; // expected-warning{{at the end of the constructor}} + std::initializer_list<int> il // expected-note {{declared here}} + = {1, 2, 3}; // ok, unused + std::initializer_list<int> jl{1, 2, 3}; // expected-note {{default member init}} haslist1(); }; -haslist1::haslist1() -: il{1, 2, 3} // expected-warning{{at the end of the constructor}} +haslist1::haslist1() // expected-error {{backing array for 'std::initializer_list' member 'jl' is a temporary object}} +: il{1, 2, 3} // expected-error {{backing array for 'std::initializer_list' member 'il' is a temporary object}} {} namespace PR12119 { |