From d4ec562b3aaf50ea9015f82c96ebfd05a35fc7ef Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 12 Jun 2013 23:38:09 +0000 Subject: Simplify: we don't need any special-case lifetime extension when initializing declarations of reference type; they're handled by the general case handling of MaterializeTemporaryExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183875 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGDecl.cpp') diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 4d14014f9c..7fdd334e04 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -1160,7 +1160,7 @@ void CodeGenFunction::EmitExprAsInit(const Expr *init, QualType type = D->getType(); if (type->isReferenceType()) { - RValue rvalue = EmitReferenceBindingToExpr(init, D); + RValue rvalue = EmitReferenceBindingToExpr(init); if (capturedByInit) drillIntoBlockVariable(*this, lvalue, cast(D)); EmitStoreThroughLValue(rvalue, lvalue, true); -- cgit v1.2.3