diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-27 03:37:57 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-27 03:37:57 +0000 |
commit | e9f2f45fe9bf79bd4aea47fa1ad9204b68510fd9 (patch) | |
tree | ae45a10f7b2b32ecf294996ddb90caca9adb170a /test/CodeGenCXX/references.cpp | |
parent | 68ea78a093271301dc6396fc683644d8e13a90dd (diff) |
Functions that return references can be rvalues as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72457 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/references.cpp')
-rw-r--r-- | test/CodeGenCXX/references.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGenCXX/references.cpp b/test/CodeGenCXX/references.cpp index aee395251e..e5db446fae 100644 --- a/test/CodeGenCXX/references.cpp +++ b/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() { |