diff options
author | Richard Trieu <rtrieu@google.com> | 2018-03-15 03:00:55 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2018-03-15 03:00:55 +0000 |
commit | 09c163bb6b646e3e8125f19f48a729cf53451d6e (patch) | |
tree | 40056d3975c3aa43ec4747e30e782893d1381ed1 /clang/lib/Sema/SemaExprCXX.cpp | |
parent | cedfa6da81404050b5d907d0092f326e97820176 (diff) | |
download | bcm5719-llvm-09c163bb6b646e3e8125f19f48a729cf53451d6e.tar.gz bcm5719-llvm-09c163bb6b646e3e8125f19f48a729cf53451d6e.zip |
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
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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, |