diff options
author | John McCall <rjmccall@apple.com> | 2010-11-18 19:01:18 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-18 19:01:18 +0000 |
commit | 0943168ac126b8047f30f6bd215fbe7db14d61ba (patch) | |
tree | d4e607bc4eb0ea16a0398f41710e50ef3954e53c /lib/Sema/SemaDeclCXX.cpp | |
parent | f4bed3f768a1effac21f3089f4c05f9ab9c37fe3 (diff) |
Add an assertion, fix a whole bunch of bugs, comment the assertion
out because there are still bugs left.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 77f604a653..7217b25652 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -4906,7 +4906,7 @@ void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, // Construct a reference to the "other" object. We'll be using this // throughout the generated ASTs. - Expr *OtherRef = BuildDeclRefExpr(Other, OtherRefType, VK_RValue, Loc).take(); + Expr *OtherRef = BuildDeclRefExpr(Other, OtherRefType, VK_LValue, Loc).take(); assert(OtherRef && "Reference to parameter cannot fail!"); // Construct the "this" pointer. We'll be using this throughout the generated @@ -5012,11 +5012,11 @@ void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, MemberLookup.addDecl(*Field); MemberLookup.resolveKind(); ExprResult From = BuildMemberReferenceExpr(OtherRef, OtherRefType, - Loc, /*IsArrow=*/false, - SS, 0, MemberLookup, 0); + Loc, /*IsArrow=*/false, + SS, 0, MemberLookup, 0); ExprResult To = BuildMemberReferenceExpr(This, This->getType(), - Loc, /*IsArrow=*/true, - SS, 0, MemberLookup, 0); + Loc, /*IsArrow=*/true, + SS, 0, MemberLookup, 0); assert(!From.isInvalid() && "Implicit field reference cannot fail"); assert(!To.isInvalid() && "Implicit field reference cannot fail"); |