summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-12-09 06:48:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-12-09 06:48:56 +0000
commit0db1ea5f686068114324fff222fd6b2d39e8ae55 (patch)
tree54dd52e077952d59eda0c414607d4051666e74f9 /clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
parentf86b5dc7009e7686fc31ff0d1e8a7bff138607cd (diff)
downloadbcm5719-llvm-0db1ea5f686068114324fff222fd6b2d39e8ae55.tar.gz
bcm5719-llvm-0db1ea5f686068114324fff222fd6b2d39e8ae55.zip
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
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r--clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp8
1 files changed, 8 insertions, 0 deletions
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<int[2]>) {}
+ void f(std::initializer_list<int[2][2]>) = delete;
+ void h() {
+ f({{1,2},{3,4}});
+ }
+}
OpenPOWER on IntegriCloud