summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/references.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-02-03 19:13:55 +0000
committerAnders Carlsson <andersca@mac.com>2010-02-03 19:13:55 +0000
commite78ccb4d609a113c3e06a9c4583e845e90b1a037 (patch)
treeac300d4005045ad0c1ecdea633cfb652aeeb14dc /test/CodeGenCXX/references.cpp
parent0f01a331918cefe21fcd567e5f40cd00de2beccf (diff)
Handle reference binding in aggregate initializers. Fixes another 47 tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/references.cpp')
-rw-r--r--test/CodeGenCXX/references.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCXX/references.cpp b/test/CodeGenCXX/references.cpp
index 6bec8bd8c3..39b5909fb9 100644
--- a/test/CodeGenCXX/references.cpp
+++ b/test/CodeGenCXX/references.cpp
@@ -38,6 +38,8 @@ void test_bool() {
bool_reference_return() = true;
a = bool_reference_return();
+
+ struct { const bool& b; } b = { true };
}
void test_scalar() {
@@ -54,6 +56,8 @@ void test_scalar() {
int_reference_return() = 10;
a = int_reference_return();
+
+ struct { const int& a; } agg = { 10 };
}
void test_complex() {
@@ -64,6 +68,8 @@ void test_complex() {
complex_int_reference_return() = 10i;
a = complex_int_reference_return();
+
+ struct { const _Complex int &a; } agg = { 10i };
}
void test_aggregate() {
@@ -74,6 +80,8 @@ void test_aggregate() {
aggregate_reference_return().a = 10;
c = aggregate_reference_return();
+
+ struct { const C& a; } agg = { C() };
}
int& reference_return() {