[cfe-commits] r72460 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Douglas Gregor
dgregor at apple.com
Tue May 26 22:00:47 PDT 2009
Author: dgregor
Date: Wed May 27 00:00:47 2009
New Revision: 72460
URL: http://llvm.org/viewvc/llvm-project?rev=72460&view=rev
Log:
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!
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=72460&r1=72459&r2=72460&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed May 27 00:00:47 2009
@@ -1609,6 +1609,7 @@
UsualUnaryConversions(FnExpr);
Input.release();
+ Args[0] = Arg;
return Owned(new (Context) CXXOperatorCallExpr(Context, OverOp, FnExpr,
Args, 2, ResultTy,
OpLoc));
@@ -1725,6 +1726,8 @@
Base.release();
Idx.release();
+ Args[0] = LHSExp;
+ Args[1] = RHSExp;
return Owned(new (Context) CXXOperatorCallExpr(Context, OO_Subscript,
FnExpr, Args, 2,
ResultTy, LLoc));
More information about the cfe-commits
mailing list