llvm-project/clang/test/CodeGenCXX/assign-operator.cpp
Eli Friedman 01cad4c6b0 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
2009-11-07 00:02:45 +00:00

10 lines
108 B
C++

// RUN: clang-cc %s -emit-llvm-only -verify
class x {
int operator=(int);
};
void a() {
x a;
a = 1u;
}