diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-31 02:56:17 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-31 02:56:17 +0000 |
commit | 72752e88efa9179417626b9030425a71f952ba54 (patch) | |
tree | 232f1f6f7749db3a74e3985c0b09d31f630b7739 /clang/test/SemaCXX/decl-init-ref.cpp | |
parent | 7b4f8a4181c032330d75780b97dee0d3b4d3dc5f (diff) | |
download | bcm5719-llvm-72752e88efa9179417626b9030425a71f952ba54.tar.gz bcm5719-llvm-72752e88efa9179417626b9030425a71f952ba54.zip |
Fix handling of braced-init-list as reference initializer within aggregate
initialization. Previously we would incorrectly require an extra set of braces
around such initializers.
llvm-svn: 182983
Diffstat (limited to 'clang/test/SemaCXX/decl-init-ref.cpp')
-rw-r--r-- | clang/test/SemaCXX/decl-init-ref.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/decl-init-ref.cpp b/clang/test/SemaCXX/decl-init-ref.cpp index 4c635c1a244..6802e0c52c5 100644 --- a/clang/test/SemaCXX/decl-init-ref.cpp +++ b/clang/test/SemaCXX/decl-init-ref.cpp @@ -26,4 +26,7 @@ int main() { } struct PR6139 { A (&x)[1]; }; -PR6139 x = {{A()}}; // expected-error{{non-const lvalue reference to type 'A [1]' cannot bind to a temporary of type 'A'}} +PR6139 x = {{A()}}; // expected-error{{non-const lvalue reference to type 'A [1]' cannot bind to an initializer list temporary}} + +struct PR6139b { A (&x)[1]; }; +PR6139b y = {A()}; // expected-error{{non-const lvalue reference to type 'A [1]' cannot bind to a temporary of type 'A'}} |