diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/SemaCXX/cxx0x-initializer-aggregates.cpp | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/SemaCXX/cxx0x-initializer-aggregates.cpp')
-rw-r--r-- | test/SemaCXX/cxx0x-initializer-aggregates.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-aggregates.cpp b/test/SemaCXX/cxx0x-initializer-aggregates.cpp index c83058a..f53ac6d 100644 --- a/test/SemaCXX/cxx0x-initializer-aggregates.cpp +++ b/test/SemaCXX/cxx0x-initializer-aggregates.cpp @@ -115,4 +115,18 @@ 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}}); + } +} + +namespace array_addressof { + using T = int[5]; + T *p = &T{1,2,3,4,5}; // expected-error {{taking the address of a temporary object of type 'T' (aka 'int [5]')}} +} |