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 | 6242a45ca50586ed3f363d4ac7422e07092e4d96 (patch) | |
tree | 34e9cd8e031c74e6132d8975df7f21bee9ddfcc3 /test/SemaCXX/decl-init-ref.cpp | |
parent | e3a9baa45c91f5c06801a2d667b5d6d71bcfb355 (diff) | |
download | clang-6242a45ca50586ed3f363d4ac7422e07092e4d96.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182983 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/decl-init-ref.cpp')
-rw-r--r-- | test/SemaCXX/decl-init-ref.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/SemaCXX/decl-init-ref.cpp b/test/SemaCXX/decl-init-ref.cpp index 4c635c1a24..6802e0c52c 100644 --- a/test/SemaCXX/decl-init-ref.cpp +++ b/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'}} |