diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-09 06:48:56 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-09 06:48:56 +0000 |
commit | 0db1ea5f686068114324fff222fd6b2d39e8ae55 (patch) | |
tree | 54dd52e077952d59eda0c414607d4051666e74f9 /clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp | |
parent | f86b5dc7009e7686fc31ff0d1e8a7bff138607cd (diff) | |
download | bcm5719-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-aggregates.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp index c83058a5e19..7d1fa7e3ec2 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp @@ -115,4 +115,13 @@ namespace sub_constructor { Aggr invalid { {} , {&ok1} , {0,0} }; // expected-error {{no matching constructor for initialization}} NoDefaultConstructor2 array_ok[] = { {0,0} , {0,1} }; NoDefaultConstructor2 array_error[] = { {0,0} , {0} }; // expected-error {{no matching constructor for initialization}} -}
\ No newline at end of file +} + +namespace multidimensional_array { + void g(const int (&)[2][2]) {} + void g(const int (&)[2][2][2]) = delete; + + void h() { + g({{1,2},{3,4}}); + } +} |