Don't drop the computed implicit conversions when building a call to

overloaded operator[] or overloaded postfix unary operator (++,
--). Thanks to Eli for finding this bug!

llvm-svn: 72460
This commit is contained in:
Douglas Gregor 2009-05-27 05:00:47 +00:00
parent b909bf4937
commit 2517f334b4
1 changed files with 3 additions and 0 deletions

View File

@ -1609,6 +1609,7 @@ Sema::ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc,
UsualUnaryConversions(FnExpr); UsualUnaryConversions(FnExpr);
Input.release(); Input.release();
Args[0] = Arg;
return Owned(new (Context) CXXOperatorCallExpr(Context, OverOp, FnExpr, return Owned(new (Context) CXXOperatorCallExpr(Context, OverOp, FnExpr,
Args, 2, ResultTy, Args, 2, ResultTy,
OpLoc)); OpLoc));
@ -1725,6 +1726,8 @@ Sema::ActOnArraySubscriptExpr(Scope *S, ExprArg Base, SourceLocation LLoc,
Base.release(); Base.release();
Idx.release(); Idx.release();
Args[0] = LHSExp;
Args[1] = RHSExp;
return Owned(new (Context) CXXOperatorCallExpr(Context, OO_Subscript, return Owned(new (Context) CXXOperatorCallExpr(Context, OO_Subscript,
FnExpr, Args, 2, FnExpr, Args, 2,
ResultTy, LLoc)); ResultTy, LLoc));