From a1c9d4d9325de9c6e12aea4c02f4c15aa0615bf2 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. llvm-svn: 183875 --- clang/lib/CodeGen/CGCall.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGCall.cpp') diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 77a43a2fc4a..80446393d5b 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2013,8 +2013,7 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, const Expr *E, if (E->isGLValue()) { assert(E->getObjectKind() == OK_Ordinary); - return args.add(EmitReferenceBindingToExpr(E, /*InitializedDecl=*/0), - type); + return args.add(EmitReferenceBindingToExpr(E), type); } if (hasAggregateEvaluationKind(type) && -- cgit v1.2.3