From 09c163bb6b646e3e8125f19f48a729cf53451d6e Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Thu, 15 Mar 2018 03:00:55 +0000 Subject: Refactoring code around move/copy initialization. NFC. Use an enum parameter instead of a bool for more control on how the copy elision functions work. Extract the move initialization code from the move or copy initialization block. Patch by: Arthur O'Dwyer Differential Revision: https://reviews.llvm.org/D43898 llvm-svn: 327598 --- clang/lib/Sema/SemaExprCXX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaExprCXX.cpp') diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 4baf52f5b78..a3cb462b46a 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -728,7 +728,7 @@ ExprResult Sema::BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, // exception object const VarDecl *NRVOVariable = nullptr; if (IsThrownVarInScope) - NRVOVariable = getCopyElisionCandidate(QualType(), Ex, false); + NRVOVariable = getCopyElisionCandidate(QualType(), Ex, CES_Strict); InitializedEntity Entity = InitializedEntity::InitializeException( OpLoc, ExceptionObjectTy, -- cgit v1.2.3