pcc added a comment.
That would break things, unfortunately. Consider this code:
A *ptr;
struct A {
A() {
ptr = this;
}
};
void f(A a) {
assert(ptr == &a);
}
void g() {
f(A());
}
If we make a copy of `a` in `f`, the assertion would fail.
Repository:
rL LLVM
http://reviews.llvm.org/D14972