From 0db1ea5f686068114324fff222fd6b2d39e8ae55 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 9 Dec 2012 06:48:56 +0000 Subject: Fix overload resolution for the initialization of a multi-dimensional array from a braced-init-list. There seems to be a core wording wart here (it suggests we should be testing whether the elements of the init list are implicitly convertible to the array element type, not whether there is an implicit conversion sequence) but our prior behavior appears to be a bug, not a deliberate effort to implement the standard as written. llvm-svn: 169690 --- clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp') diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index 0962253b988..4fd419dc748 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -191,3 +191,11 @@ namespace rdar11948732 { namespace PR14272 { auto x { { 0, 0 } }; // expected-error {{cannot deduce actual type for variable 'x' with type 'auto' from initializer list}} } + +namespace initlist_of_array { + void f(std::initializer_list) {} + void f(std::initializer_list) = delete; + void h() { + f({{1,2},{3,4}}); + } +} -- cgit v1.2.3