summaryrefslogtreecommitdiff
path: root/test/SemaCXX/decl-init-ref.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-05-31 02:56:17 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-05-31 02:56:17 +0000
commit6242a45ca50586ed3f363d4ac7422e07092e4d96 (patch)
tree34e9cd8e031c74e6132d8975df7f21bee9ddfcc3 /test/SemaCXX/decl-init-ref.cpp
parente3a9baa45c91f5c06801a2d667b5d6d71bcfb355 (diff)
downloadclang-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.cpp5
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'}}