From 01cad4c6b03579286dbed8900d9e16ea7eebea8c Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sat, 7 Nov 2009 00:02:45 +0000 Subject: 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. llvm-svn: 86307 --- clang/test/CodeGenCXX/assign-operator.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 clang/test/CodeGenCXX/assign-operator.cpp (limited to 'clang/test/CodeGenCXX') diff --git a/clang/test/CodeGenCXX/assign-operator.cpp b/clang/test/CodeGenCXX/assign-operator.cpp new file mode 100644 index 00000000000..3e0be451943 --- /dev/null +++ b/clang/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; +} -- cgit v1.2.3