summaryrefslogtreecommitdiffstats
path: root/clang/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
commit66498388a7d1bf9de14942194009aed9eecb4fe0 (patch)
tree3c3ba6ddc4a1b55b3745f9d7d698235fce203cd0 /clang/test/CodeGenCXX/references.cpp
parent9b92ef90f0d236e3c948401f5773c7d3a53d1e57 (diff)
downloadbcm5719-llvm-66498388a7d1bf9de14942194009aed9eecb4fe0.tar.gz
bcm5719-llvm-66498388a7d1bf9de14942194009aed9eecb4fe0.zip
Handle reference binding in aggregate initializers. Fixes another 47 tests.
llvm-svn: 95235
Diffstat (limited to 'clang/test/CodeGenCXX/references.cpp')
-rw-r--r--clang/test/CodeGenCXX/references.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/references.cpp b/clang/test/CodeGenCXX/references.cpp
index 6bec8bd8c38..39b5909fb9a 100644
--- a/clang/test/CodeGenCXX/references.cpp
+++ b/clang/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() {
OpenPOWER on IntegriCloud