summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-02-16 04:42:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-02-16 04:42:59 +0000
commit40574cc569c83faf4285c52e2279a5e26858f779 (patch)
tree898db563dc2fae5a584e0b4cb8aaf43e66625d55 /clang/test
parent9b529a76e9c607f2715529abe1cc9c2cffa35563 (diff)
downloadbcm5719-llvm-40574cc569c83faf4285c52e2279a5e26858f779.tar.gz
bcm5719-llvm-40574cc569c83faf4285c52e2279a5e26858f779.zip
DR1467: If aggregate initialization encounters an initializer list for which
subobject initialization is not possible, be sure to note the overall initialization as having failed so that overload resolution knows that the relevant candidate is not viable. llvm-svn: 229353
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/drs/dr14xx.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CXX/drs/dr14xx.cpp b/clang/test/CXX/drs/dr14xx.cpp
index 0ffc0edcece..9491f7da147 100644
--- a/clang/test/CXX/drs/dr14xx.cpp
+++ b/clang/test/CXX/drs/dr14xx.cpp
@@ -327,6 +327,13 @@ namespace dr1467 { // dr1467: 3.7 c++11
struct NestedInit { int a, b, c; };
NestedInit ni[1] = {{NestedInit{1, 2, 3}}};
+
+ namespace NestedInit2 {
+ struct Pair { int a, b; };
+ struct TwoPairs { TwoPairs(Pair, Pair); };
+ struct Value { Value(Pair); Value(TwoPairs); };
+ void f() { Value{{{1,2},{3,4}}}; }
+ }
} // dr1467
namespace dr1490 { // dr1490: 3.7 c++11
OpenPOWER on IntegriCloud