Handle the remaining unhandled cases in EmitReferenceBindingToExpr.
It would be nice if someone could write an ObjC++ testcase for the case
of passing a property returning a struct to a function taking a const
reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72159 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/references.cpp b/test/CodeGenCXX/references.cpp
index 9b9e0f8..0124f69 100644
--- a/test/CodeGenCXX/references.cpp
+++ b/test/CodeGenCXX/references.cpp
@@ -24,6 +24,8 @@
void f(const _Complex int&);
void f(const C&);
+C structfunc();
+
void test_bool() {
bool a = true;
f(a);
@@ -39,6 +41,9 @@
f(s.bitfield);
f(10);
+
+ __attribute((vector_size(16))) typedef int vec4;
+ f((vec4){1,2,3,4}[0]);
}
void test_complex() {
@@ -51,5 +56,7 @@
void test_aggregate() {
C c;
f(c);
+
+ f(structfunc());
}