diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-11-07 00:02:45 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-11-07 00:02:45 +0000 |
commit | 01cad4c6b03579286dbed8900d9e16ea7eebea8c (patch) | |
tree | 3b1e3c2e7adf61059834df333a3e88fc9d498d5d /clang/lib/AST/DeclCXX.cpp | |
parent | 9eb7701dff9df1c7900a14c75eb1fba5cd48ed8a (diff) | |
download | bcm5719-llvm-01cad4c6b03579286dbed8900d9e16ea7eebea8c.tar.gz bcm5719-llvm-01cad4c6b03579286dbed8900d9e16ea7eebea8c.zip |
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
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index b4c0c59733e..e325a25c762 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -280,6 +280,9 @@ void CXXRecordDecl::addedAssignmentOperator(ASTContext &Context, return; // This is a copy assignment operator. + // Note on the decl that it is a copy assignment operator. + OpDecl->setCopyAssignment(true); + // Suppress the implicit declaration of a copy constructor. UserDeclaredCopyAssignment = true; |