summaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2018-03-15 03:00:55 +0000
committerRichard Trieu <rtrieu@google.com>2018-03-15 03:00:55 +0000
commitfedf2e8d9a9bf9f91e06e8486e1a310ed7e12949 (patch)
treee043879d7b686f10cc6dbba191bb9725a59f8695 /clang/lib/Sema/SemaExprCXX.cpp
parent41e8e58b8ce8cd2a43500bcb0fda09c956c310d5 (diff)
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
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp2
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,