diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-27 05:00:47 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-27 05:00:47 +0000 |
commit | 2517f334b44bbdd255fd602cdbf74703991e5fd5 (patch) | |
tree | 07d125a8513dae66096ed731ede42946ee730039 /clang | |
parent | b909bf4937df1661615191c0864080baa578a5f2 (diff) | |
download | bcm5719-llvm-2517f334b44bbdd255fd602cdbf74703991e5fd5.tar.gz bcm5719-llvm-2517f334b44bbdd255fd602cdbf74703991e5fd5.zip |
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
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 574955789cf..9350caaca47 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1609,6 +1609,7 @@ Sema::ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc, UsualUnaryConversions(FnExpr); Input.release(); + Args[0] = Arg; return Owned(new (Context) CXXOperatorCallExpr(Context, OverOp, FnExpr, Args, 2, ResultTy, OpLoc)); @@ -1725,6 +1726,8 @@ Sema::ActOnArraySubscriptExpr(Scope *S, ExprArg Base, SourceLocation LLoc, Base.release(); Idx.release(); + Args[0] = LHSExp; + Args[1] = RHSExp; return Owned(new (Context) CXXOperatorCallExpr(Context, OO_Subscript, FnExpr, Args, 2, ResultTy, LLoc)); |