diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-24 17:16:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-24 17:16:46 +0000 |
commit | 65552c424750aaa58533ca385a90b77c033cc635 (patch) | |
tree | da760ed7a7e7d3d6b2240ee5a3b3ba135af64ed2 /lib/Sema/SemaExpr.cpp | |
parent | 9f2df88757c8db3d97fa198f0ad4b6f139baa66a (diff) |
InitializationSequence handles binding to temporaries, so that
argument-passing doesn't have to. Fixes PR5867, where we were binding
a temporary twice in the AST and, therefore, calling its destructor
twice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index a6b409b99f..a9acf72644 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3234,9 +3234,6 @@ bool Sema::GatherArgumentsForCall(SourceLocation CallLoc, return true; Arg = ArgE.takeAs<Expr>(); - - if (!ProtoArgType->isReferenceType()) - Arg = MaybeBindToTemporary(Arg).takeAs<Expr>(); } else { ParmVarDecl *Param = FDecl->getParamDecl(i); |