summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/explicit.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-09-04 22:13:39 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-09-04 22:13:39 +0000
commit8d082d187e573988ef9e3e5ecbbe2553bdeb5a70 (patch)
tree6e8818fcd9c3a272cd2e6d81be9718711faa29c8 /clang/test/SemaCXX/explicit.cpp
parent1b23158ce419a1c67a27aa45ec9f2a5b26b6b9a9 (diff)
downloadbcm5719-llvm-8d082d187e573988ef9e3e5ecbbe2553bdeb5a70.tar.gz
bcm5719-llvm-8d082d187e573988ef9e3e5ecbbe2553bdeb5a70.zip
PR20844: If we fail to list-initialize a reference, map to the referenced type
before retrying the initialization to produce diagnostics. Otherwise, we may fail to produce any diagnostics, and silently produce invalid AST in a -Asserts build. Also add a note to this codepath to make it more clear why we were trying to create a temporary. llvm-svn: 217197
Diffstat (limited to 'clang/test/SemaCXX/explicit.cpp')
-rw-r--r--clang/test/SemaCXX/explicit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/explicit.cpp b/clang/test/SemaCXX/explicit.cpp
index aa28bd85af4..155141c058c 100644
--- a/clang/test/SemaCXX/explicit.cpp
+++ b/clang/test/SemaCXX/explicit.cpp
@@ -86,7 +86,7 @@ namespace Conversion {
// Y is an aggregate, so aggregate-initialization is performed and the
// conversion function is not considered.
const Y y10{z}; // expected-error {{excess elements}}
- const Y& y11{z}; // expected-error {{no viable conversion from 'Z' to 'const Y'}}
+ const Y& y11{z}; // expected-error {{excess elements}} expected-note {{in initialization of temporary of type 'const Y'}}
const int& y12{z};
// X is not an aggregate, so constructors are considered.
OpenPOWER on IntegriCloud