Make sure isCopyAssignment is only true for actual copy assignment operators,
instead of all assignment operators. The mistake messes up IRGen because
it ends up assuming that the assignment operator is actually the implicit
copy assignment operator, and therefore tries to emit the RHS as an lvalue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86307 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/assign-operator.cpp b/test/CodeGenCXX/assign-operator.cpp
new file mode 100644
index 0000000..3e0be45
--- /dev/null
+++ b/test/CodeGenCXX/assign-operator.cpp
@@ -0,0 +1,9 @@
+// RUN: clang-cc %s -emit-llvm-only -verify
+
+class x {
+int operator=(int);
+};
+void a() {
+ x a;
+ a = 1u;
+}