For C++ copied in objects, use copy constructors in
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105469 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/copy-in-cplus-object.cpp b/test/CodeGenCXX/copy-in-cplus-object.cpp
new file mode 100644
index 0000000..6dcb128
--- /dev/null
+++ b/test/CodeGenCXX/copy-in-cplus-object.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
+
+struct TestObject
+{
+	TestObject(const TestObject& inObj);
+	TestObject();
+	TestObject& operator=(const TestObject& inObj);
+	int version() const;
+
+};
+
+void testRoutine() {
+    TestObject one;
+    int (^V)() = ^{ return one.version(); };
+}
+
+// CHECK: call void @_ZN10TestObjectC1ERKS_
+