summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-03-24 01:14:25 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-03-24 01:14:25 +0000
commit49a6b6e91edfa67320fcde5d4c8455acab0010a3 (patch)
tree1eb06064b1abcfd64a4d76a75f56be2df4274cf8 /clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
parentc3ddb655ccfc6c10f1fb07e094ac85b0f5e53482 (diff)
downloadbcm5719-llvm-49a6b6e91edfa67320fcde5d4c8455acab0010a3.tar.gz
bcm5719-llvm-49a6b6e91edfa67320fcde5d4c8455acab0010a3.zip
Fix handling of initialization from parenthesized initializer list.
This change fixes a crash on initialization of a reference from ({}) during template instantiation and incidentally improves diagnostics. This reverts a prior attempt to handle this in r286721. Instead, we teach the initialization code that initialization cannot be performed if a source type is required and the initializer is an initializer list (which is not an expression and does not have a type), and likewise for function-style cast expressions. llvm-svn: 298676
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-constructor.cpp')
-rw-r--r--clang/test/SemaCXX/cxx0x-initializer-constructor.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
index c10bee917ac..07a233b56ce 100644
--- a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
+++ b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
@@ -173,8 +173,7 @@ namespace objects {
// invalid
H h1({1, 2}); // expected-error {{no matching constructor}}
(void) new H({1, 2}); // expected-error {{no matching constructor}}
- // FIXME: Bad diagnostic, mentions void type instead of init list.
- (void) H({1, 2}); // expected-error {{no matching conversion}}
+ (void) H({1, 2}); // expected-error {{no matching constructor}}
// valid (by copy constructor).
H h2({1, nullptr});
OpenPOWER on IntegriCloud