summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/references.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-27 03:37:57 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-27 03:37:57 +0000
commitd8b7ae205e61cc54fb954e67209aa8867e9a8b45 (patch)
tree99d6676b7b465946fdb0fc5880f088ccc55fff1f /clang/test/CodeGenCXX/references.cpp
parentd6f28344966f57f66859ea327d13b5094c2a3077 (diff)
downloadbcm5719-llvm-d8b7ae205e61cc54fb954e67209aa8867e9a8b45.tar.gz
bcm5719-llvm-d8b7ae205e61cc54fb954e67209aa8867e9a8b45.zip
Functions that return references can be rvalues as well.
llvm-svn: 72457
Diffstat (limited to 'clang/test/CodeGenCXX/references.cpp')
-rw-r--r--clang/test/CodeGenCXX/references.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/references.cpp b/clang/test/CodeGenCXX/references.cpp
index aee395251ea..e5db446faec 100644
--- a/clang/test/CodeGenCXX/references.cpp
+++ b/clang/test/CodeGenCXX/references.cpp
@@ -38,6 +38,7 @@ void test_bool() {
f(true);
bool_reference_return() = true;
+ a = bool_reference_return();
}
void test_scalar() {
@@ -53,6 +54,7 @@ void test_scalar() {
f((vec4){1,2,3,4}[0]);
int_reference_return() = 10;
+ a = int_reference_return();
}
void test_complex() {
@@ -62,6 +64,7 @@ void test_complex() {
f(10i);
complex_int_reference_return() = 10i;
+ a = complex_int_reference_return();
}
void test_aggregate() {
OpenPOWER on IntegriCloud