summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r--clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
index 860a4aa6c6f..ece014d93a5 100644
--- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
+++ b/clang/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-error {{backing array for 'std::initializer_list' member 'jl' is a temporary object}}
haslist1();
};
-haslist1::haslist1()
-: il{1, 2, 3} // expected-warning{{at the end of the constructor}}
+haslist1::haslist1() // expected-note {{used here}}
+: il{1, 2, 3} // expected-error {{backing array for 'std::initializer_list' member 'il' is a temporary object}}
{}
namespace PR12119 {
OpenPOWER on IntegriCloud